当前位置:网站首页>8.2.2 inject bean (interceptor and filter) into filter through delegatingfilterproxy

8.2.2 inject bean (interceptor and filter) into filter through delegatingfilterproxy

2020-11-06 01:14:09 Memory

All the source code in the project can be found in the linked repository :https://github.com/chenhaoxiang/uifuture-ssm

8.2.3 adopt DelegatingFilterProxy Inject... Into the filter Bean

In general , Sensitive words may need to be extracted from the data , Then it must be called to Service layer . Since we need to get from Service Layer gets sensitive words , It must involve injecting... Into the filter Spring Medium Bean. Because of the filter and Spring MVC Of DispatcherServlet The initialization sequence of the controller ( Be careful ,Spring Of Bean Initialization is prior to the filter initialization , Can be in the filter of init In order to get Spring In container Bean It's verified ), You can't go directly through the filter org.springframework.beans.factory.annotation.Autowired And so on Bea

版权声明
本文为[Memory]所创,转载请带上原文链接,感谢