Skip to content

Commit

Permalink
Refine warn log message with advisor and ROLE_INFRASTRUCTURE hints
Browse files Browse the repository at this point in the history
Closes gh-33184
  • Loading branch information
jhoeller committed Sep 27, 2024
1 parent 26054d1 commit b6cfa2d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
Expand Down Expand Up @@ -437,8 +437,9 @@ public Object postProcessAfterInitialization(Object bean, String beanName) {
logger.warn("Bean '" + beanName + "' of type [" + bean.getClass().getName() +
"] is not eligible for getting processed by all BeanPostProcessors " +
"(for example: not eligible for auto-proxying). Is this bean getting eagerly " +
"injected into a currently created BeanPostProcessor " + bppsInCreation + "? " +
"Check the corresponding BeanPostProcessor declaration and its dependencies.");
"injected/applied to a currently created BeanPostProcessor " + bppsInCreation + "? " +
"Check the corresponding BeanPostProcessor declaration and its dependencies/advisors. " +
"If this bean does not have to be post-processed, declare it with ROLE_INFRASTRUCTURE.");
}
}
return bean;
Expand Down

0 comments on commit b6cfa2d

Please sign in to comment.