想要在前端获取到message和exception,配置一下配置
server.error.include-exception=true
server.error.include-message=always
接下来就可以获取了
------------------------------------
I have to add server.error.include-binding-errrors: always
in my application.yml
in order to enable the "errors"
field in the error resonse:
So my application.yml
is now:
server:
error:
include-message: always
include-binding-errors: always