Skip overriding primary bean definition with non-primary one #32125
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: declined
A suggestion or change that we don't feel we should currently apply
Here is my case, I defined a default bean in xml configuration, sometimes I want override that bean with another implementation via
@Component
and@Primary
, it's fine if injection is autowired by type but not name, the ideal solution is pinning the primary bean definition make it cannot be overridden by non-primary one.Here is test case:
The text was updated successfully, but these errors were encountered: