Wiring Beans
Spring wires beans together using Component Scanning and Autowiring.
Also using XML bean dependencies can be injected.
Component Scanning
It automatically discover the beans which required in the application context.
To make any pojo eligible for component scanning it need to be annotated with @Component
Autowiring
Using autowiring spring automatically satisfies bean dependencies.
It uses the @Autowired annotation for satisfying bean dependencies.
Also using the @Bean annotation dependencies can be satisfied.
Above features keeps the configuration at minimum level.
we will learn all in details in other listings
Also using XML bean dependencies can be injected.
Component Scanning
It automatically discover the beans which required in the application context.
To make any pojo eligible for component scanning it need to be annotated with @Component
Autowiring
Using autowiring spring automatically satisfies bean dependencies.
It uses the @Autowired annotation for satisfying bean dependencies.
Also using the @Bean annotation dependencies can be satisfied.
Above features keeps the configuration at minimum level.
we will learn all in details in other listings