This library provides Spring Components under the net.kaduk.a2a package.
To use this library without manually specifying scanBasePackages:
-
Add this library as a dependency in your application's
pom.xmlorbuild.gradle. -
Project Structure:
Make sure your application's@SpringBootApplicationclass is located in a package above or at the same level asnet.kaduk.a2ain your directory hierarchy. The default component scanning of Spring will then automatically find all beans provided by this library.
com/
example/
yourapp/
Application.java // @SpringBootApplication here
net/
kaduk/
a2a/
// library classes
- No Extra Configuration Needed:
With the setup above, you do not need to use
@ComponentScan(basePackages = { "net.kaduk.a2a" })in your code.
All the beans in this library are annotated with Spring stereotypes and are automatically discovered by default component scanning.
If you place your main application class in a sub-package that does not cover net.kaduk.a2a, Spring will not find these beans automatically. Either move your main class to a parent package or, as a last resort, use @ComponentScan.
[Specify your license here]