maven创建spring项目之后,启动报错java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoade

错误:

 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
Java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

原因:

tomcat在发布项目的时候没有同时发布maven依赖所添加的jar包

解决办法:
项目 —> 属性 -> Deployment Assembly -> Add -> Java Build Path Entries -> 选择Maven Dependencies -> Finish -> OK

把对应的Maven依赖包也发布到tomcat,调试时会自动把那些jar发布到指定目录下,tomcat也能找到那些jar了。

原文地址:https://www.cnblogs.com/-wyl/p/6274334.html