Dependency Injection
-
Component ScanningFramework/SPRING 2020. 5. 23. 19:46
1. Overview With Spring, we use the @ComponentScan annotation along with @Configuration annotation to specify the packages that we want to be scanned. @ComponentScan without arguments tells Spring to scan the current package and all of its sub-packages. Note that the main application class is also a bean as it's annotated with @Configuration, which is a @Component. Also, note that the main appli..