diff --git a/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java b/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java index b319a3d8c6..ab2a0f6042 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/SpringBeanAutowiringSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2021 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. @@ -85,10 +85,11 @@ public abstract class SpringBeanAutowiringSupport { bpp.processInjection(target); } else { - if (logger.isDebugEnabled()) { - logger.debug("Current WebApplicationContext is not available for processing of " + + if (logger.isWarnEnabled()) { + logger.warn("Current WebApplicationContext is not available for processing of " + ClassUtils.getShortName(target.getClass()) + ": " + - "Make sure this class gets constructed in a Spring web application. Proceeding without injection."); + "Make sure this class gets constructed in a Spring web application after the" + + "Spring WebApplicationContext has been initialized. Proceeding without injection."); } } }