Search in ancestors for bean of type ConfigClientProperties
Before this change we check that it is there, then don't look in the ancestors. A test would be useful. Fixes gh-191
This commit is contained in:
@@ -44,7 +44,7 @@ public class ConfigClientAutoConfiguration {
|
||||
if (context.getParent() != null
|
||||
&& BeanFactoryUtils.beanNamesForTypeIncludingAncestors(
|
||||
context.getParent(), ConfigClientProperties.class).length > 0) {
|
||||
return BeanFactoryUtils.beanOfType(context.getParent(),
|
||||
return BeanFactoryUtils.beanOfTypeIncludingAncestors(context.getParent(),
|
||||
ConfigClientProperties.class);
|
||||
}
|
||||
ConfigClientProperties client = new ConfigClientProperties(environment);
|
||||
|
||||
Reference in New Issue
Block a user