component scan에서 include vs exclude의 차이점 설명을??
- 작성자 :
- 하*수
- 작성일 :
- 2009-08-26 16:55:19
- 조회수 :
- 4,888
- 구분 :
- 실행환경
- 진행상태 :
- 완료
Q
<context:component-scan base-package="imis,egovframe" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
</context:component-scan>
====== 에러내용 =====
No bean named `imisSampleService` is defined
====== include로 변경 후 에러 없음 ====
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/>
====== 질문 ======
include 와 exclude의 차이점이 뭔가요????
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service"/>
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>
</context:component-scan>
====== 에러내용 =====
No bean named `imisSampleService` is defined
====== include로 변경 후 에러 없음 ====
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/>
====== 질문 ======
include 와 exclude의 차이점이 뭔가요????
A
안녕하세요
use-default-filters="false" 된 상태에서
글자 그대로 include 는 scan 시 찾을 때 등록시킬 대상이 되는 것이고
exclude 는 scan 시 제외되는 대상입니다.
그럼 수고하세요
use-default-filters="false" 된 상태에서
글자 그대로 include 는 scan 시 찾을 때 등록시킬 대상이 되는 것이고
exclude 는 scan 시 제외되는 대상입니다.
그럼 수고하세요