SSI 框架中,Filter如何取得spring中的bean
Filter的init方法中暴露了FilterConfig接口,通过该接口可以获取ServletContext
FilterConfig.getServletContext().
Springweb容器加载完成后,将在ServletContext中存放ApplicationContext,以WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE为储存的Key值,所以,ServletContext.getAttribut(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE)可以获取ApplicationContext
getServletConfig() 与getServletContext() 的区别
http://blog.csdn.net/wyd458549392147/article/details/6944470
FilterConfig的作用
http://blog.csdn.net/u013315062/article/details/50421470