Merge branch '2.5.x'

Closes gh-27425
pull/27453/head
Andy Wilkinson 3 years ago
commit 91579158c3

@ -162,7 +162,7 @@ public class DatabaseInitializationDependencyConfigurer implements ImportBeanDef
List<String> names = SpringFactoriesLoader.loadFactoryNames(type, beanFactory.getBeanClassLoader()); List<String> names = SpringFactoriesLoader.loadFactoryNames(type, beanFactory.getBeanClassLoader());
Instantiator<T> instantiator = new Instantiator<>(type, Instantiator<T> instantiator = new Instantiator<>(type,
(availableParameters) -> availableParameters.add(Environment.class, this.environment)); (availableParameters) -> availableParameters.add(Environment.class, this.environment));
return instantiator.instantiate(names); return instantiator.instantiate(beanFactory.getBeanClassLoader(), names);
} }
private static BeanDefinition getBeanDefinition(String beanName, ConfigurableListableBeanFactory beanFactory) { private static BeanDefinition getBeanDefinition(String beanName, ConfigurableListableBeanFactory beanFactory) {

Loading…
Cancel
Save