스프링프레임워크를 공부하다가 

<context:annotation-config/>

 

DI를 공부하면서 xml 파일에 위와 같은 코드를 적었는데 빨간 줄이 뜨면서 오류가 났다.

구글링을 통해 찾아보니

 

이 코드를 (수정 전)

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

xsi:schemaLocation="http://www.springframework.org/schema/tool
	http://www.springframework.org/schema/tool/spring-tool.xsd"

 

밑에처럼 바꿔주면 해결된다!

(수정 후)

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

// xsi:schemaLocation에 밑의 주소 추가
xsi:schemaLocation="http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context-3.0.xsd"

+ Recent posts