ComponentScan (Spring Framework 5.3.17 API)
docs.spring.io › annotation › ComponentScanConfigures component scanning directives for use with @ Configuration classes. Provides support parallel with Spring XML's <context:component-scan> element. Either basePackageClasses () or basePackages () (or its alias value ()) may be specified to define specific packages to scan. If specific packages are not defined, scanning will occur from the package of the class that declares this annotation.
Spring Component Scanning | Baeldung
www.baeldung.com › spring-component-scanningMar 17, 2022 · 1. Overview. In this tutorial, we'll cover component scanning in Spring. When working with Spring, we can annotate our classes in order to make them into Spring beans. Furthermore, we can tell Spring where to search for these annotated classes, as not all of them must become beans in this particular run. Of course, there are some defaults for component scanning, but we can also customize the packages for search.