springboot错误消息message和exception | Validation response is missing errors details

想要在前端获取到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
posted @ 2021-01-29 15:24  tonggc1668  阅读(312)  评论(0)    收藏  举报