Use ClassLoader from ResourceLoader to load PropertySourceLoaders

Fixes gh-44427
This commit is contained in:
Andy Wilkinson
2025-02-24 19:46:52 +00:00
parent 56c955158d
commit 5be5eaf7f2

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2024 the original author or authors. * Copyright 2012-2025 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -89,7 +89,7 @@ public class StandardConfigDataLocationResolver
ResourceLoader resourceLoader) { ResourceLoader resourceLoader) {
this.logger = logFactory.getLog(StandardConfigDataLocationResolver.class); this.logger = logFactory.getLog(StandardConfigDataLocationResolver.class);
this.propertySourceLoaders = SpringFactoriesLoader.loadFactories(PropertySourceLoader.class, this.propertySourceLoaders = SpringFactoriesLoader.loadFactories(PropertySourceLoader.class,
getClass().getClassLoader()); resourceLoader.getClassLoader());
this.configNames = getConfigNames(binder); this.configNames = getConfigNames(binder);
this.resourceLoader = new LocationResourceLoader(resourceLoader); this.resourceLoader = new LocationResourceLoader(resourceLoader);
} }