itlaoli

AbstractErrorController

AbstractErrorController提供了多个方法可以从 request 中获取错误信息,包含以下信息:

timestamp,错误发生的时 间;
status,对应于HTTP Status,如 404;
error,错误消息,如 Bad Request、Not Found;

message,详细错误信息;
exception,如果应用抛出有异常,exception是字符串 ,代表异常的类名,如

org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;

path,请求的URI;

errors, @Validated 校验错误的时候,校验结果信息放到这里

 

 

posted @ 2019-01-03 15:19  竹--石  阅读(1073)  评论(0编辑  收藏  举报