Use bean class loader when importing auto-configuration

Fixes gh-26234
This commit is contained in:
Andy Wilkinson 2021-04-26 15:36:56 +01:00
parent 1d88e8fa65
commit 4a990f3ed2

View File

@ -94,7 +94,7 @@ class ImportAutoConfigurationImportSelector extends AutoConfigurationImportSelec
}
protected Collection<String> loadFactoryNames(Class<?> source) {
return SpringFactoriesLoader.loadFactoryNames(source, getClass().getClassLoader());
return SpringFactoriesLoader.loadFactoryNames(source, getBeanClassLoader());
}
@Override