Filter注入对象

由于没有在web.xml文件中加上<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>,导致Filter注入对象,启动tomcat报“Cannot create resource instance” 错误,这是因为 tomcat在启动时顺序:监听器–>过滤器–>servlet,需要在spring监听器先注入bean,才能在过滤器中注入。

posted @ 2017-06-21 21:05  stanljj  阅读(374)  评论(0编辑  收藏  举报