摘要: 实现拦截器类 @Component public class MyInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServle 阅读全文
posted @ 2020-10-20 23:58 圣金巫灵 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 如果@EnableWebMvc 写在配置类上, springboot的默认配置就会失效 原因: 因为@EnableWebMvc会引入这个类 它继承自 WebMvc的自动配置类: WebMvcAutoConfiguration 生效的条件是 @ConditionalOnMissingBean({Web 阅读全文
posted @ 2020-10-20 23:48 圣金巫灵 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 这个我没弄懂。mark WebMvcConfigurationSupport WebMvcConfigurer EnableWebMvc 阅读全文
posted @ 2020-10-20 02:01 圣金巫灵 阅读(73) 评论(0) 推荐(0) 编辑