2012-03-20 2 views
1

나는 내 dispatcher-servlet.xml스프링 MVC 3.1 - 네임 스페이스 오류

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

는 XML 유효성 검사에 다음 한이

잘못된 내용 요소 '구성 요소 - 스캔 컨텍스트'를 시작 발견 된 말을 실패합니다. '{ "http://www.springframework.org/schema/mvc":getument-resolvers,"http://www.springframework.org/ 스키마/mvc ": 반환 값 처리기}'예상 됨 .

http://www.springframework.org/schema/mvc/에 정의 된 스키마를 확인했으며 모든 것이 잘된 것처럼 보입니다. 이전에는 Spring mvc 3.0을 사용하고 있었고 문제가 발생하지 않았습니다. 내 항아리 파일은 모두 WEB-INF/lib에 직접 있습니다. 어떤 아이디어?

업데이트

이 유효성 검사 <context:component-scan base-package="com" /> 실패 라인이며, 예 사용되는 모든 병은 당신이,

+0

버전 3.1의 모든 항아리가 있습니까? – Ralph

+0

@skaffman : 정보 제공을 위해 질문을 업데이트했습니다. – Raghav

답변

4

이 잘못 될 수 스프링 3.1 있지만 스키마보고 오류가 주어진 <context:component-scan base-package="com" /> - 요소를 <mvc:annotation-driven> </mvc:annotation-driven> 태그 내에 넣으려고하거나 <mvc:annotation-driven> 태그를 닫는 것을 잊어 버리려고합니다. 구성 요소 스캔을 태그 바깥에 놓거나 <mvc:annotation-driven> 태그를 올바르게 닫습니다.

+0

고마워요. 네, 을 닫는 것을 잊었습니다. 바보 나. 저는 30 분이 넘는 시간 동안 문제가 무엇인지 파악하려고했습니다. 내 눈을 확인 했어 : P – Raghav

관련 문제