![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
后端
文章平均质量分 84
狂奔的程序员1
这个作者很懒,什么都没留下…
展开
-
springboot之@ServletComponentScan注解
连接地址:https://blog.csdn.net/catoop/article/details/50501686 在SpringBootApplication 上使用@ServletComponentScan 注解后,Servlet、Filter、Listener 可以直接通过 @WebServlet、@WebFilter、@WebListener 注解自动注册,无需其他代码。 事...原创 2022-04-28 10:00:44 · 1340 阅读 · 0 评论 -
springboot注册拦截器
问题1 springboot注册拦截器过滤器方法 注册拦截器:在启动类中注册bean @EnableWebMvc @Configuration static class MvcConfigurer implements WebMvcConfigurer { //在拦截器中需要使用这个bean,如果直接在拦截器中注入的话会失败,所以选择有参构造的方式传入 @Autowired ...原创 2018-07-24 14:23:19 · 1227 阅读 · 0 评论