October 2017
Intermediate to advanced
396 pages
10h 2m
English
Spring provides support for automatic bean wiring. This means that Spring automatically resolves the dependencies that are required by the dependent bean by finding other collaborating beans in the application context. Bean Autowiring is another way of DI pattern configuration. It reduces verbosity in the application, but the configuration is spread throughout the application. Spring's @Autowired annotation is used for auto bean wiring. This @Autowired annotation indicates that autowiring should be performed for this bean.
In our example, we have TransferService which has dependencies of AccountRepository and TransferRepository. Its constructor is annotated with @Autowired indicating that when Spring creates ...
Read now
Unlock full access