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

时间:2024-09-14 19:05:32
 <!-- 配置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>