[英]CNF org.springframework.web.servlet.DispatcherServlet
I have included org.springframework.spring-webmvc-4.3.1.RELEASE
and tried with 3.2.4.RELEASE
even though i am getting this error. 我已经包含
org.springframework.spring-webmvc-4.3.1.RELEASE
并尝试使用3.2.4.RELEASE
即使我遇到此错误。
POM 聚甲醛
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>1.4.1.RELEASE</version>
</dependency> <dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
</dependencies>
error 错误
SEVERE: Servlet /SpringMVCTutorial threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
Any one help 任何人帮忙
EDIT I have added Maven Dependency in Deployment assembly, I'm getting this error now 编辑我已经在部署程序集中添加了Maven依赖关系,我现在收到此错误
ERROR 错误
SEVERE: StandardWrapper.Throwable
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://maven.apache.org/POM/4.0.0]
Offending resource: ServletContext resource [/WEB-INF/SpringMVC-servlet.xml]
If your IDE is eclipse, Try the following. 如果您的IDE偏食,请尝试以下操作。 Source
资源
You need to add the "Maven Dependency" in the Deployment Assembly 您需要在部署程序集中添加“ Maven依赖关系”
1. right click on your project and choose properties. 1.右键单击您的项目,然后选择属性。 2. click on Deployment Assembly.
2.单击部署程序集。 3. click add 4. click on "Java Build Path Entries" 5. select Maven Dependencies" 6. click Finish. 7. Rebuild and deploy again
3.单击添加 4.单击“ Java构建路径条目” 5.选择“ Maven依赖关系” 6.单击“完成” 。7. 重新构建并再次部署
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.