配置spring监听器

在web.xml文件中配置spring监听器

<!-- spring监听器 -->
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:applicationContext.xml</param-value>
	</context-param>

监听器有几种,多用这一种


版权声明:本文为qq_31657261原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。