Merge branch '2.3.x'

Closes gh-22160
This commit is contained in:
Andy Wilkinson
2020-06-30 10:53:49 +01:00
7 changed files with 7 additions and 11 deletions

View File

@@ -550,7 +550,7 @@ public class SpringApplication {
return null;
}
ResourceLoader resourceLoader = (this.resourceLoader != null) ? this.resourceLoader
: new DefaultResourceLoader(getClassLoader());
: new DefaultResourceLoader(null);
SpringApplicationBannerPrinter bannerPrinter = new SpringApplicationBannerPrinter(resourceLoader, this.banner);
if (this.bannerMode == Mode.LOG) {
return bannerPrinter.print(environment, this.mainApplicationClass, logger);

View File

@@ -326,8 +326,7 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
Loader(ConfigurableEnvironment environment, ResourceLoader resourceLoader) {
this.environment = environment;
this.placeholdersResolver = new PropertySourcesPlaceholdersResolver(this.environment);
this.resourceLoader = (resourceLoader != null) ? resourceLoader
: new DefaultResourceLoader(getClass().getClassLoader());
this.resourceLoader = (resourceLoader != null) ? resourceLoader : new DefaultResourceLoader(null);
this.propertySourceLoaders = SpringFactoriesLoader.loadFactories(PropertySourceLoader.class,
getClass().getClassLoader());
}

View File

@@ -33,8 +33,7 @@ import org.springframework.util.ResourceUtils;
*/
class StringToFileConverter implements Converter<String, File> {
private static final ResourceLoader resourceLoader = new DefaultResourceLoader(
StringToFileConverter.class.getClassLoader());
private static final ResourceLoader resourceLoader = new DefaultResourceLoader(null);
@Override
public File convert(String source) {