2013-07-06 2 views
0

간단한 웹 앱 (spring 3 + thymeleaf, glassfish 3.x에 배포)이 있습니다.
'mvc : annotation-driven'에 대한 선언이 없습니다.

<?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:p="http://www.springframework.org/schema/p" 
    xmlns:aop="http://www.springframework.org/schema/aop" 
    xmlns:tx="http://www.springframework.org/schema/tx" 
    xmlns:mvc="http://www.springframework.org/schema/mvc" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd 
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd 
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd 
    http://www.springframework.org/schema/mvc http://www.springframework.org/schema/context/spring-mvc-3.1.xsd 
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> 
      <context:component-scan base-package="arek" /> 
     <mvc:annotation-driven></mvc:annotation-driven> 
    </beans> 
내가 검색

하지만 아무것도 :

SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 16 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 16; columnNumber: 24; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:annotation-driven'. 

여기 내 applicationContext.xml이다 : 나는 그것을 실행하려고하면 오류가 발생합니다. 도와 주셔서 감사합니다.

답변

3

http://www.springframework.org/schema/context/spring-mvc-3.1.xsd 대신 http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd을 시도하십시오.

희망이 도움이됩니다.

+0

작동합니다. 감사합니다. – user978758

관련 문제