이클립스 spring -servlet-context.xml 에러

yeongnie·2022년 8월 3일
0

Error

목록 보기
1/4
post-custom-banner

사용 버전
java 1.8 221
eclipse
tomcat 8.0
spring 3 - legacy project - MVC

설정에서 java 8 에 대한 3가지 설정완료
pom.xml 설정 완료
후 이런 에러가 떴다.

에러 전문

cvc-complex-type.2.4.a: Invalid content was found starting with element 'annotation-driven'. One of '{"http://www.springframework.org/schema/beans":description, "http://www.springframework.org/schema/beans":import, "http://www.springframework.org/schema/beans":alias, "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/schema/beans"], "http://www.springframework.org/schema/beans":beans}' is expected.

옛날 사용했던 <beans:beans 이하가 달라서 그냥 삭제하고 복붙해줬다.

변경 전

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

변경후

<beans:beans xmlns="http://www.springframework.org/schema/mvc"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:beans="http://www.springframework.org/schema/beans"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
profile
curiosity-paradise
post-custom-banner

0개의 댓글