-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Description
ConfigDataLocationResolver
implementations are loaded using the resource loader's ClassLoader
Lines 157 to 161 in 5e57f1b
protected ConfigDataLocationResolvers createConfigDataLocationResolvers(DeferredLogFactory logFactory, | |
ConfigurableBootstrapContext bootstrapContext, Binder binder, ResourceLoader resourceLoader) { | |
return new ConfigDataLocationResolvers(logFactory, bootstrapContext, binder, resourceLoader, | |
SpringFactoriesLoader.forDefaultResourceLocation(resourceLoader.getClassLoader())); | |
} |
One of these implementations, StandardConfigDataLocationResolver
, then uses its class's own class loader to load PropertySourceLoader
implementations:
Lines 86 to 93 in 5e57f1b
public StandardConfigDataLocationResolver(DeferredLogFactory logFactory, Binder binder, | |
ResourceLoader resourceLoader) { | |
this.logger = logFactory.getLog(StandardConfigDataLocationResolver.class); | |
this.propertySourceLoaders = SpringFactoriesLoader.loadFactories(PropertySourceLoader.class, | |
getClass().getClassLoader()); | |
this.configNames = getConfigNames(binder); | |
this.resourceLoader = new LocationResourceLoader(resourceLoader); | |
} |
For consistency, it should use the ResourceLoader
that's passed into its constructor instead.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug