컴포넌트 스캔

컴포넌트 스캔@Configuration@ComponentScan( excludeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = Configuration.class))public class AutoAppConfig {}스프링 설정 파일에 @ComponentScan 선언 시 @Component로 선언된 클래스를 찾아서 자동으로 스프링 빈으로 등록한다.스프링 설정 파일에 @Bean으로 따로 등록하지 않아도 스프링 빈으로 등록해준다.excludeFilters 옵션으로 컴포넌트 스캔 제외 대상을 지정할 수 있다.excludeFilters 옵션으로 컴포넌트 스캔 대상을 지정할 수 있다.컴포넌트 스캔 : @Compone..
h2boom
'컴포넌트 스캔' 태그의 글 목록