@Primary not working for FactoryBeans #22675
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: superseded
An issue that has been superseded by another
Affects: Spring 5.1.5.RELEASE
Defining multiple
FactoryBean
s, and then marking one of them with@Primary
doesn't work as expected.There is related stack overflow issue for that, but shouldn't it be considered as a bug?
One could say that treating
FactoryBean
as a bean itself is some kind of overkill, but in my opinion, there are justified use cases.For example, take look at artembilan argumentation in this similar issue, but related to spring-integration.
The text was updated successfully, but these errors were encountered: