tomcat启动时会加载web.xml
加载<listener> 和<context-param>属性
org.springframework.web.context.ContextLoaderListener.项目启动,会找这个监听器去查contextConfigLocation
配置一下这个监听器就好了
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
本文介绍Tomcat启动时如何加载web.xml文件中的<listener>和<context-param>属性,并通过ContextLoaderListener来指定Spring配置文件的位置。
1331

被折叠的 条评论
为什么被折叠?



