Browse Source

Redefine DefaultResourceLoader default constructor for late TCCL access

Closes gh-24957
pull/24989/head
Juergen Hoeller 5 years ago
parent
commit
cdadb834b0
  1. 6
      spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java

6
spring-core/src/main/java/org/springframework/core/io/DefaultResourceLoader.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -58,11 +58,11 @@ public class DefaultResourceLoader implements ResourceLoader { @@ -58,11 +58,11 @@ public class DefaultResourceLoader implements ResourceLoader {
/**
* Create a new DefaultResourceLoader.
* <p>ClassLoader access will happen using the thread context class loader
* at the time of this ResourceLoader's initialization.
* at the time of actual resource access (since 5.3). For more control, pass
* a specific ClassLoader to {@link #DefaultResourceLoader(ClassLoader)}.
* @see java.lang.Thread#getContextClassLoader()
*/
public DefaultResourceLoader() {
this.classLoader = ClassUtils.getDefaultClassLoader();
}
/**

Loading…
Cancel
Save