Closed as not planned
Description
environment: spring boot 2.6.10
define a demo app with following configuration class:
@Configuration
public class DemoConfig {
@Bean("aaa")
public String foo() {
return "foo";
}
@Bean("aaa")
public String bar() {
return "bar";
}
}
should be: BeanDefinitionOverrideException
is: bean named "aaa" added to bean context (with value "foo"), method bar() never added to bean definition
debugging shows a return statement here, that seems to the cuprit.