Using @Autowired in abstract class with generics: ‘No beans of Generic type found’ but autowiring still works
Let’s say I have ten controllers that want to autowire to ten services. The controllers and services act very similarly, they just differ in the type of object or DTO they deal with (and the DTOs themselves are very similar too). So I create an abstract controller like so: