Spring Configuration
@ComponentScan tells Spring which base package(s) to scan for classes annotated with stereotype annotations (@Component and its specializations @Service, @Repository, @Controller) and automatically register them as beans, eliminating the need to declare each one explicitly with a @Bean method. By default it scans the package of the annotated class and all sub-packages.
Beginner3 min

