mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Instantiate detectors with ClassLoader that discovered them
Fixes gh-27422
This commit is contained in:
parent
dfe91be885
commit
29c83bfd76
@ -162,7 +162,7 @@ public class DatabaseInitializationDependencyConfigurer implements ImportBeanDef
|
||||
List<String> names = SpringFactoriesLoader.loadFactoryNames(type, beanFactory.getBeanClassLoader());
|
||||
Instantiator<T> instantiator = new Instantiator<>(type,
|
||||
(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) {
|
||||
|
Loading…
Reference in New Issue
Block a user