Skip to content

Commit b6cfa2d

Browse files
committed
Refine warn log message with advisor and ROLE_INFRASTRUCTURE hints
Closes gh-33184
1 parent 26054d1 commit b6cfa2d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-context/src/main/java/org/springframework/context/support/PostProcessorRegistrationDelegate.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -437,8 +437,9 @@ public Object postProcessAfterInitialization(Object bean, String beanName) {
437437
logger.warn("Bean '" + beanName + "' of type [" + bean.getClass().getName() +
438438
"] is not eligible for getting processed by all BeanPostProcessors " +
439439
"(for example: not eligible for auto-proxying). Is this bean getting eagerly " +
440-
"injected into a currently created BeanPostProcessor " + bppsInCreation + "? " +
441-
"Check the corresponding BeanPostProcessor declaration and its dependencies.");
440+
"injected/applied to a currently created BeanPostProcessor " + bppsInCreation + "? " +
441+
"Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. " +
442+
"If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE.");
442443
}
443444
}
444445
return bean;

0 commit comments

Comments
 (0)