We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 794e859 commit 9cb5f48Copy full SHA for 9cb5f48
spring-core/src/main/java/org/springframework/core/SpringProperties.java
@@ -55,7 +55,8 @@ public abstract class SpringProperties {
55
static {
56
try {
57
ClassLoader cl = SpringProperties.class.getClassLoader();
58
- URL url = cl.getResource(PROPERTIES_RESOURCE_LOCATION);
+ URL url = (cl != null ? cl.getResource(PROPERTIES_RESOURCE_LOCATION) :
59
+ ClassLoader.getSystemResource(PROPERTIES_RESOURCE_LOCATION));
60
if (url != null) {
61
logger.info("Found 'spring.properties' file in local classpath");
62
InputStream is = url.openStream();
0 commit comments