interface A{
void some();
}
@Component
class B implements A{
@override
some(){
}
}
@Component
class C implements A{
@override
some(){
}
}
Class D {
@Autowired
List<A> somes;//will it have the instances of both
}
I am working on a project where we have multiple classes implement the same interface. How do I get the list in class D to contain beans for both class B and class C?