강의

멘토링

로드맵

인프런 커뮤니티 질문&답변

igr113님의 프로필 이미지
igr113

작성한 질문수

스프링 프레임워크는 내 손에 [스프2탄]

07_스프2탄_JUnit리스트보기 Service 테스트

서비스스캔시 오류가 발생합니다.

작성

·

1.8K

·

수정됨

0

KakaoTalk_Snapshot_20230118_120013.png KakaoTalk_20230118_115111804.pngKakaoTalk_20230118_115127157.pngKakaoTalk_Snapshot_20230118_115417.pngKakaoTalk_Snapshot_20230118_115435.png 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표시란에 마우스를 대면 위와 같은 오류가 납니다.

퀴즈

41%나 틀려요. 한번 도전해보세요!

스프링 3계층 아키텍처에서 서비스(Service) 계층의 주요 역할은 무엇일까요?

클라이언트 요청을 직접 처리하고 응답해요.

비즈니스 로직을 구현하고 데이터 접근 계층과 상호작용해요.

데이터베이스와 직접 통신하여 CRUD 작업을 수행해요.

사용자 인터페이스(View)를 담당하여 화면을 보여줘요.

답변 2

0

igr113님의 프로필 이미지
igr113
질문자

KakaoTalk_Snapshot_20230118_130451.png

말씀하신 동일한 코드 지웠고요 ;빼니까 저부분에 오류가 발생하네요... 스캔부분은 변함이 없고요

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

박매일님의 프로필 이미지
박매일
지식공유자

image
2곳에 동일한 코드가 있습니다. 확인해보시고 위의 ; 를 제거해야 됩니다.

igr113님의 프로필 이미지
igr113

작성한 질문수

질문하기