2013-10-07 5 views
11

spring-security-config-3.1.0.RC3을 추가했습니다. .jar 내 lib 폴더 및 나는 여전히이 오류가 발생합니다. 가능한 이유는 무엇입니까 ??cvc-complex-type.2.4.c : 일치하는 와일드 카드가 엄격하지만 'mvc : annotation-driven'오류에 대한 선언을 찾을 수 없습니다.

xmlns:mvc="http://www.springframework.org/schema/mvc" 

하지만 당신은 여기 언급하지 않을 :

다음은이가 내 디스패처-servlet.xml에

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:mvc="http://www.springframework.org/schema/mvc" 
    xsi:schemaLocation=" 
    http://www.springframework.org/schema/beans  
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
    http://www.springframework.org/schema/context 
    http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

    <context:component-scan base-package="com.tcs.rspm.controller" /> 
<mvc:annotation-driven /> 
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> 
     <property name="prefix" value="/webpages/" /> 
     <property name="suffix" value=".jsp" /> 
    </bean> 

</beans> 

답변

29

입니다

xsi:schemaLocation=" 
http://www.springframework.org/schema/beans  
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

그 문제를 해결하려면, 너는해야한다

http://www.springframework.org/schema/mvc 
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd 
뿐만 아니라이 6,

,

xsi:schemaLocation=" 
http://www.springframework.org/schema/mvc 
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd 
http://www.springframework.org/schema/beans  
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

같은 주 : 스키마 참조 당신은뿐만 아니라 http://www.springframework.org/schema/context/spring-context.xsd처럼 참조를 사용할 수 있도록, 쉽게 업그레이드 할 수 있도록 봄 버전을 언급하지 않는 것이 실제로 일반적이다.

관련 문제