Skip to content

Commit 46b7cd5

Browse files
committed
Log missing web application context at warn level (instead of debug)
Closes gh-26925
1 parent 7f670bb commit 46b7cd5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -85,10 +85,11 @@ public static void processInjectionBasedOnCurrentContext(Object target) {
8585
bpp.processInjection(target);
8686
}
8787
else {
88-
if (logger.isDebugEnabled()) {
89-
logger.debug("Current WebApplicationContext is not available for processing of " +
88+
if (logger.isWarnEnabled()) {
89+
logger.warn("Current WebApplicationContext is not available for processing of " +
9090
ClassUtils.getShortName(target.getClass()) + ": " +
91-
"Make sure this class gets constructed in a Spring web application. Proceeding without injection.");
91+
"Make sure this class gets constructed in a Spring web application after the" +
92+
"Spring WebApplicationContext has been initialized. Proceeding without injection.");
9293
}
9394
}
9495
}

0 commit comments

Comments
 (0)