spring-framework/framework-docs/modules/ROOT
Simon Baslé d5c7a5e2db Bean overriding by type uses isAutowireCandidate for matching
This commit uses the bean factory `isAutowiredCandidate` method directly
in `BeanOverrideBeanFactoryPostProcessor` to select a single match among
multiple candidates when matching by type.

The expected consequence, in most cases, is that this will delegate to
a `@Qualifier`-aware `QualifierAnnotationAutowireCandidateResolver`.
In that sense, bean overriding by-type matching is now potentially
taking Qualifier annotations or meta-annotations into account.

It also changes the way existing bean definitions are checked in case
a bean name has been specified: factory beans are now taken into account
when checking the type of an existing definition matches the expected
bean override type.

Closes gh-32822
2024-05-21 14:06:52 +02:00
..
assets/images Migrate Structure 2023-05-04 15:35:05 +01:00
examples Use include-code Macro 2023-05-04 15:35:05 +01:00
pages Bean overriding by type uses isAutowireCandidate for matching 2024-05-21 14:06:52 +02:00
partials/web Extract recurring asciidoc links to attributes, cleanup old doc files 2023-11-21 15:59:24 +01:00
nav.adoc Polish "Bean Overriding in Tests" support 2024-04-16 17:08:15 +02:00