spring容器中请求的顺序

顺序: WEB容器Tomcat---Filter--Servlet--Interceptor--Controller

Filter和Interceptor的区别

来源不同

Filter: Servlet; Interceptor: Spring

作用不同

Filter:基于作用于所有请求; Interceptor:只针对于DispatcherServlet中配置的映射请求

操作Bean

Filter:原生的不可以操作Bean; Interceptor:可以操作Bean

posted @ 2025-09-18 09:11  是笨小孩儿  阅读(0)  评论(0)    收藏  举报