Merge branch '2.1.x'

Closes gh-17793
This commit is contained in:
Madhura Bhave
2019-08-05 15:32:47 -07:00

View File

@@ -156,7 +156,8 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
Set<Class<?>> parameterizedContainers = spec.getParameterizedContainers();
if (spec.getStrategy() == SearchStrategy.ANCESTORS) {
BeanFactory parent = beanFactory.getParentBeanFactory();
Assert.isInstanceOf(ConfigurableListableBeanFactory.class, parent, "Unable to use SearchStrategy.PARENTS");
Assert.isInstanceOf(ConfigurableListableBeanFactory.class, parent,
"Unable to use SearchStrategy.ANCESTORS");
beanFactory = (ConfigurableListableBeanFactory) parent;
}
MatchResult result = new MatchResult();