Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Injection of beans that implement interfaces with Generics without qualifier annotation [SPR-9836] #14469
I recently had a look at a new Dependency Injection framework called Dagger from Jesse Wilson at Square.
It has two cool features that I wish Spring had as well (will create a separate issue for the other feature). In Spring, when two classes implement the same generified interface, say Repository<T>, Spring cannot find the corresponding injection points (because of type erasure I guess). This requires the developer to add qualifier annotations which makes the code less readable. Dagger is somehow able to determine the injection points without qualifier annotations. It would be great if this feature could be added to Spring.
1 votes, 5 watchers