严重: Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener]


今天在调试Spring代码的时候报这个错误,页面404

严重: Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener]
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)
  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137)
  at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:546)
  at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:527)
  at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4714)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)

解决方法:

项目属性 -> Deployment Assembly

 

完成即解决问题。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注