Closed as not planned
Closed as not planned
Description
Following code stop working in spring-context 6.1.0.
@Bean
public BeanA bean1 () {
return new BeanA("a1");
}
@Bean
public BeanA bean2 () {
return new BeanA("a2");
}
@Bean
public BeanB bean3 (BeanA bean1) {
BeanB beanB = new BeanB(bean1);
return beanB;
}
Error:
Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.example.BeanA' available: expected single matching bean but found 2: bean1,bean2
It was working fine until spring-context 6.0.14
bean-method-parameters.zip
Didn't find any related change here:
https://github.com/spring-projects/spring-framework/wiki/What's-New-in-Spring-Framework-6.x