SpringBoot之自定义错误页面

 SpringBoot 默认配置: 如果是浏览器请求URL错误,返回错误页面;如果是postman等非浏览器客户端请求URL错误,返回 json 数据: SpringBoot源码: @Controller @RequestMapping({"${server.error.path:${error.path:/error}}"}) public class BasicErrorController
相关文章
相关标签/搜索