Below you will find pages that utilize the taxonomy term “spring-boot”
Posts
Autowiring Generics In Spring
@Autowired is heavily used in Spring for injecting dependencies. By entrusting the framework itself to inject dependencies (eg: repositories interface) programmer can rest assurred and focus on core business logic of the application.
We can also use @Autowired in order to initialize java collections which use Generics. Let’s say we have an interface which could be implemented by a given number of classes. We can Register each of those classes in Spring Context with @Context annotation.
read more