인프런 커뮤니티 질문&답변
서비스스캔시 오류가 발생합니다.
작성
·
1.8K
·
수정됨
0



cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.
서비스 제이유닛으로 테스트 하기위해서 servlet에 있는 scan을 root-context.xml으로 옮기는 과정중에서 일어났습니다.
오류 뜨는 x표시란에 마우스를 대면 위와 같은 오류가 납니다.
퀴즈
스프링 3계층 아키텍처에서 서비스(Service) 계층의 주요 역할은 무엇일까요?
클라이언트 요청을 직접 처리하고 응답해요.
비즈니스 로직을 구현하고 데이터 접근 계층과 상호작용해요.
데이터베이스와 직접 통신하여 CRUD 작업을 수행해요.
사용자 인터페이스(View)를 담당하여 화면을 보여줘요.
답변 2
0

말씀하신 동일한 코드 지웠고요 ;빼니까 저부분에 오류가 발생하네요... 스캔부분은 변함이 없고요
9번라인 오류는
Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-context-4.3.xsd', because 1) could not find the document; 2) the document could
not be read; 3) the root element of the document is not <xsd:schema>.
- There are '2' errors in 'spring-context-4.3.xsd'.
12라인 오류
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.
9번 라인 오류는 구글에 검색해보니까 ;을 지워서 생기는 오류라고 하더라고요.. 어떻게 해야할까요 ㅠㅠ
0







<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
에러난 부분을 위의 소스코드로 바꾸시고 maven update를 다시해보시고 봐보시기 바랍니다