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
原文地址:https://www.cnblogs.com/tonggc1668/p/14345178.html