-
카테고리
-
세부 분야
백엔드
-
해결 여부
해결됨
root-context.xml의 namespace 질문 있습니다.
23.03.25 18:24 작성 조회수 384
1
http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
xsd옆에 버전을 쓸 때 mybatis-spring-1.2.xsd
1.2라고 적으신 이유가 궁금합니다.
mybatis-spring은 pom.xml에서 1.3.1 버전을 받은 것으로 기억합니다.
그래서 저는 처음에 1.3.1.xsd로 했더니
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'resources'.
라면서 선언을 안 해줬다고 에러가 나옵니다.(실행도 안 됩니다.)
그런데 1.2.xsd로 하거나 버전을 적지 않으면 정상적으로 실행되네요.
다른 이유가 있을까요...??
답변을 작성해보세요.
1
박매일
지식공유자2023.03.25
mybatis-spring API 버전과 xml 네임스페이스 버전은 꼭 같게 할 필요가 없습니다.(다른것입니다.)
API버전은 1.3.1 버전이지만 xml의 네임스페이스 버전은 mybatis-spring-1.2.xsd로 하시면 될듯합니다.
답변 1