web.xml上监听器作用
- <!--Spring ApplicationContext 载入 -->
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
- <!-- 使Spring支持request与session的scope,如:<bean id="loginAction" class="com.foo.LoginAction" scope="request"/> -->
- <listener>
- <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
- </listener>
- <!-- Spring 刷新Introspector防止内存泄露 -->
- <listener>
- <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
- </listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/config/application-context.xml
/WEB-INF/config/cache-context.xml
/WEB-INF/config/captcha-context.xml
/WEB-INF/config/jeecore-context.xml
/WEB-INF/config/jeecms-context.xml
</param-value>
</context-param>
和
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
一起用