Qualified beans are not autowired [SPR-17056] #21594
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: superseded
An issue that has been superseded by another
Thomas OLIVIERI opened SPR-17056 and commented
Hello,
When defining multiple beans with the same qualifier, I expect the beans to end up in a list that can be autowired. It all works fine until a certain (weird) point.
I have a bean called MyBean:
I configure multiple beans of the same type (see: RootConfiguration.java):
Then I can retrieve them all using:
The weird issue is that if I overload the bean creation method to define the function passed as the constructor parameter, then the bean is not added to the autowired list:
That's not a big issue since the workaround is obvious but I really would like to understand what's going on behind the scenes so the DI does not work as expected.
Note that the bean that is not injected in the list is eventually created, but never acknowledged as part of its "siblings".
Thanks in advance for your insight !
Affects: 5.0.5
Reference URL: https://github.com/tdolivieri/spring-qualified-beans
The text was updated successfully, but these errors were encountered: