ConfigurationClassParser detects @Bean methods in interface hierarchies as well
Issue: SPR-14288
This commit is contained in:
@@ -1063,17 +1063,27 @@ public class ConfigurationClassPostProcessorTests {
|
||||
}
|
||||
}
|
||||
|
||||
public interface DefaultMethodsConfig {
|
||||
public interface BaseInterface {
|
||||
|
||||
@Bean
|
||||
default ServiceBean serviceBean() {
|
||||
return provider().getServiceBean();
|
||||
}
|
||||
ServiceBean serviceBean();
|
||||
}
|
||||
|
||||
public interface BaseDefaultMethods extends BaseInterface {
|
||||
|
||||
@Bean
|
||||
default ServiceBeanProvider provider() {
|
||||
return new ServiceBeanProvider();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
default ServiceBean serviceBean() {
|
||||
return provider().getServiceBean();
|
||||
}
|
||||
}
|
||||
|
||||
public interface DefaultMethodsConfig extends BaseDefaultMethods {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
Reference in New Issue
Block a user