spring web.xml

Aven project startup error: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
tomcat did not publish the jar package added by maven dependency when publishing the project, so it could not find the
solution : set eclipse:
project— > properties -> Deployment Assembly -> Add -> Java Build Path Entries -> Select Maven Dependencies -> Finish -> OK
to also publish the corresponding Maven dependencies to tomcat, and those jars will be automatically published to the specified directory during debugging, tomcat can also find those jars.
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath :/spring/applicationContext.xml</param-value>
</context-param>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326644369&siteId=291194637