展会信息港展会大全

eclipse maven工程报spring ContextLoaderListener异常
来源:互联网   发布日期:2016-01-14 14:22:48   浏览:1393次  

导读:症状:maven web工程,启动server,报ContextLoaderListener异常,部署位置的lib目录里没有工程相关的jar解决:方法1打开eclipse工程目录,...

症状:

maven web工程,启动server,报ContextLoaderListener异常,部署位置的lib目录里没有工程相关的jar

解决:

方法1

打开eclipse工程目录,在.classpath中添加或修改如下

01

<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">

02

<attributes>

03

<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

04

</attributes>

05

</classpathentry>

06

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">

07

<attributes>

08

<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

09

</attributes>

10

</classpathentry>

方法2

右键工程,属性

选择 Deployment Assembly点击add选中Maven Dependencies,最后finish。如下图

作者:藏言

赞助本站

人工智能实验室

相关热词: java 教程

AiLab云推荐
推荐内容
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港