티스토리 뷰

공부

[Spring] @ComponentScan

승가비 2022. 6. 6. 03:53
728x90
@ComponentScan({"com.my.package.first","com.my.package.second"})

https://stackoverflow.com/questions/10794587/how-to-scan-multiple-paths-using-the-componentscan-annotation/10794718#10794718

 

How to scan multiple paths using the @ComponentScan annotation?

I'm using Spring 3.1 and bootstrapping an application using the @Configuration and @ComponentScan attributes. The actual start is done with new AnnotationConfigApplicationContext(

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[Spring] Eureka Discovery  (0) 2022.06.06
[Spring] initializr  (0) 2022.06.06
[Restful] PUT vs POST  (0) 2022.06.06
[Docker] bind port  (0) 2022.06.06
[Spring] config server  (0) 2022.06.06
댓글