Fork me on Gitee
摘要: 概述 在spring boot 2.2 中 默认状态为status 999 private void addStatus(Map<String, Object> errorAttributes, RequestAttributes requestAttributes) { Integer statu 阅读全文
posted @ 2019-12-03 18:27 ---dgw博客 阅读(1519) 评论(0) 推荐(0) 编辑
摘要: spring boot 老版本处理异常 对于浏览器客户端,返回error数据 对于非浏览器返回json数据, 主要取决于你的请求head 是什么 但是当我们自定义了: 老版本无论请求什么都会返回json异常数据, @ControllerAdvice public class UserExceptio 阅读全文
posted @ 2019-12-03 16:35 ---dgw博客 阅读(1326) 评论(0) 推荐(0) 编辑
摘要: 1: 开启HiddenHttpMethodFilter 最新版本的spring boot 默认不开启 restful 分割api @Bean @ConditionalOnMissingBean({HiddenHttpMethodFilter.class}) @ConditionalOnPropert 阅读全文
posted @ 2019-12-03 14:37 ---dgw博客 阅读(3092) 评论(0) 推荐(0) 编辑