“Class Not Found Exception Spring"解决办法

Class Not Found Exception org.springframework.web.context.ContextLoaderListener 解决办法 web

刚才在群里有人问这个问题,配合着帮他解决掉了。记录下。 spring

如下是其发的目录结构 tomcat

搜索下,大概是由于编译不全或同步不完整的问题致使,stackoverflow上有相似的解决方案: app

http://stackoverflow.com/questions/6322711/tomcat-spring-web-class-not-found-exception-org-springframework-web-context eclipse

ui

I faced the same problem few days ago with m2eclipse (without WTP integration add on available via m2eclipse-extras) on Eclipse Indigo. I created a Maven Web Module and manually added the Dynamic Web Module facet to it. When I deployed it on Eclipse WST Tomcat Server, it appeared that my Maven dependencies are not getting pushed to the server when the project is published to it. spa

The solution was simple. Right Click on your web project in Project Explorer -> select 'Properties'. Under project properties, select 'Deployment Assembly'. server

The Deployment Assembly property page shows the content that will be published as a assembled artifact by Eclipse to the server. You need to tell Eclipse that you want all your Maven dependencies to be published too. ip

To do that, click 'Add' button, then select 'Java Build Path Entries'. Click Next and select Maven Dependencies. This will publish the Maven dependency JAR files to the lib folder when Eclipse publishes your project to WST server. ci

This approach worked for me.

找给群里的人参考操做以后,表示问题解决。

相关文章
相关标签/搜索