java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

来源:互联网 发布:黄子韬微博故事软件 编辑:程序博客网 时间:2024/06/05 09:10

使用maven构建多modules工程,在本地eclipse开换环境中,用tomcat启动web项目时一直报错:

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

把maven打好的war包放到tomcat里,启动没问题。。。

解决:

  1. Open the project's properties (e.g., right-click on the project's name in the project explorer and select "Properties").
  2. Select "Deployment Assembly".
  3. Click the "Add..." button on the right margin.
  4. Select "Java Build Path Entries" from the menu of Directive Type and click "Next".
  5. Select "Maven Dependencies" from the Java Build Path Entries menu and click "Finish".

You should see "Maven Dependencies" added to the Web Deployment Assembly definition.


0 0
原创粉丝点击