[Spring] 스프링 필터(Spring Filter) | FilterType 옵션
스프링에서 컴포넌트 스캔을 할 때, 필터를 사용하여 스캔에서 대상을 제외하거나 추가할 수 있다. 필터는 두 가지 종류가 있다. - includeFilters : 컴포넌트 스캔 대상을 추가로 지정한다. - excludeFilters : 컴포넌트 스캔에서 제외할 대상을 지정한다. 각각의 필터 사용법을 예시를 통해 알아보자. ● Filters 먼저 테스트 코드에 임의의 MyIncludeComponent, MyExcludeComponent 사용자 애노테이션을 생성해보자. MyIncludeComponent.annotation package hello.core.scan.Filter; import java.lang.annotation.*; // ComponentScan에 추가하기 위한 코드들(아래 3줄) @Targe..