eclipse maven工程报spring ContextLoaderListener异常
http://my.oschina.net/cangy/blog/72057
maven web工程,启动server,报ContextLoaderListener异常,部署位置的lib目录里没有工程相关的jar
解决:
方法1
打开eclipse工程目录,在.classpath中添加或修改如下
01 | < classpathentry ?kind = "con" ?path = "org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER" > |
03 | ???????? < attribute ?name = "org.eclipse.jst.component.dependency" ?value = "/WEB-INF/lib" /> |
06 | < classpathentry ?kind = "con" ?path = "org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER" > |
08 | ???????? < attribute ?name = "org.eclipse.jst.component.dependency" ?value = "/WEB-INF/lib" /> |
方法2
右键工程,属性
选择 Deployment Assembly点击add选中Maven Dependencies,最后finish。如下图
?