配置spring的监听器 让spring随项目的启动而启动

 <!-- 配置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>

猜你喜欢

转载自www.cnblogs.com/houchen/p/10750330.html