eclipse中创建maven项目, maven无法加载org.springframework.web.context.ContextLoaderListener
来源:互联网 发布:qq飞车ae86原装数据 编辑:程序博客网 时间:2024/06/06 03:22
maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
在eclipse中创建maven项目,后变为web项目,加载spring架包时出现java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误问题。现主要修改两部分。
一、项目根目录下的.project文件,把原来的<buildSpec>节点和<natures>替换掉。
替换代码为
<buildSpec> <buildCommand> <name>org.eclipse.wst.jsdt.core.javascriptValidator</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.wst.common.project.facet.core.builder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.wst.validation.validationbuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.m2e.core.maven2Builder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.maven.ide.eclipse.maven2Builder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.maven.ide.eclipse.maven2Nature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.wst.jsdt.core.jsNature</nature> </natures>
二,项目根目录下的.classpath,找到
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
替换为:
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes></classpathentry>
OK,到这一步已经完成了,到eclipse中刷新项目。可以正常运行了,问题解决。
- eclipse中创建maven项目, maven无法加载org.springframework.web.context.ContextLoaderListener
- Maven项目启动时报错org.springframework.web.context.ContextLoaderListener
- org.springframework.web.context.ContextLoaderListener:针对maven项目
- maven项目报 ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Eclipse下maven项目报错org.springframework.web.context.ContextLoaderListener解决方案
- 在SSH框架Maven项目中,报ClassNotFoundException:org.springframework.web.context.ContextLoaderListener
- maven java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- Maven工程 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven项目 启动报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
- poll机制分析
- 解决笔记本 Ubuntu 无法调节屏幕亮度的问题
- 等待队列实现代码浅析
- 透传模式(透明传输SeriaNet)详解
- Java I/O
- eclipse中创建maven项目, maven无法加载org.springframework.web.context.ContextLoaderListener
- ThinkPHP学习笔记(八)条件查询
- 中国式价值投资 四大成长股票池
- SQL视频总结
- LeetCode:Symmetric Tree
- 价值投资的误区
- hdu1033(水题)
- Magento How To Display Product Custom Option On list.phtml
- visual studio 2012 创建向导时,处理模板文件时出错的解决方法