Autowiring lets Spring automatically inject the beans that a component depends on. Together with component scanning, it allows the application context to discover components, create beans, and connect them without configuring every relationship explicitly. section 1.1
Autowiring fits into Spring’s broader automatic-configuration approach:
- Component scanning discovers application components on the classpath and creates them as beans. section 1.1
- Autowiring supplies those beans to other components when they declare dependencies. section 1.1
- Spring Boot extends these techniques with autoconfiguration based on the classpath, environment variables, and other factors. section 1.1
Figure 1.1 Application components are managed and injected into each other by the Spring application context.
Shows application components managed by the Spring application context and injected into one another. section 1.1
