有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java“mvc:annotationdriven”使程序崩溃

我的程序(Java6,Spring3.2.4)工作正常,但当我在SpringXML中添加“mvc:annotation-driven”时,它崩溃了。我需要Hibernate验证器,所以我需要那个命令。我想知道为什么我的其他注释(@RequestMapping、@Controller等)可以工作

弹簧底座。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) 个答案

  1. # 1 楼答案

    模块尚未部署。 有关详细信息,请参阅服务器日志。 在org。netbeans。模块。j2ee。部署。devmodules。应用程序编程接口。部署。部署(Deployment.java:238) 在org。netbeans。模块。专家j2ee。刽子手。performDeploy(ExecutionChecker.java:205) 在org。netbeans。模块。专家j2ee。刽子手。executionResult(ExecutionChecker.java:123) 在org。netbeans。模块。专家处决MavenCommandLineExecutor。运行(MavenCommandLineExecutor.java:235) 在org。netbeans。果心处决运行类线程。run(RunClassThread.java:153)