" MVC:注解驱动"崩溃程序

时间:2014-03-28 16:01:42

标签: java spring maven spring-mvc annotations

我的程序(Java 6,Spring 3.2.4。)运行得很好,但是当我将“mvc:annotation-driven”添加到我的Spring XML时它会崩溃。我需要Hibernate Validator所以我需要那个命令。我想知道为什么我的其他注释(@RequestMapping,@ Controller等)正在工作。

弹簧base.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:context="http://www.springframework.org/schema/context"
   xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd">

<context:component-scan base-package="testing" />


<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="prefix" value="/WEB-INF/Jsp/" />
    <property name="suffix" value=".jsp" />
</bean>

<mvc:annotation-driven />

</beans>

控制台说:

The module has not been deployed.
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:238)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:205)
at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:123)
at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.
java:235)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

当我停止服务器(Glassfish 4.0)并调试时:没有。

当我清理和构建时:

Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-
clean) on project ProjectDB: Failed to clean project: Failed to delete C:\Users 
\USER\Documents\NetBeansProjects\ProjectDB\target\ProjectDB-1.0-SNAPSHOT\WEB-INF
\lib\spring-web-3.2.4.RELEASE.jar -> [Help 1]

我不知道发生了什么。

1 个答案:

答案 0 :(得分:1)

尚未部署该模块。 有关详细信息,请参阅服     at or or or or or or or or or or or or     at or or or or or or or or or or or or or or     at or or or or or or or or or or or or     at or or or or or or or or or or or or or or or or     在org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)