spring-framework/spring-test
Sam Brannen 374c3b4545 Provide complete support for qualifier annotations with Bean Overrides
Prior to this commit, the Test Bean Override feature provided support
for overriding beans based on qualifier annotations in several
scenarios; however, qualifier annotations got lost if they were
declared on the return type of the @⁠Bean method for the bean being
overridden and the @⁠BeanOverride (such as @⁠MockitoBean) was based on
a supertype of that return type.

To address that, this commit sets the @⁠BeanOverride field as the
"qualified element" in the RootBeanDefinition to ensure that qualifier
annotations are available for subsequent autowiring candidate
resolution.

Closes gh-34646
2025-03-27 15:29:14 +01:00
..
src Provide complete support for qualifier annotations with Bean Overrides 2025-03-27 15:29:14 +01:00
.springBeans
spring-test.gradle Introduce @⁠EasyMockBean bean override example 2024-09-18 17:10:06 +02:00