From b6cfa2db0bb19bad7ea563dcc2ef65fed682b4dc Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 27 Sep 2024 19:16:05 +0200 Subject: [PATCH] Refine warn log message with advisor and ROLE_INFRASTRUCTURE hints Closes gh-33184 --- .../context/support/PostProcessorRegistrationDelegate.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/context/support/PostProcessorRegistrationDelegate.java b/spring-context/src/main/java/org/springframework/context/support/PostProcessorRegistrationDelegate.java index 7735045a980..501cc17f983 100644 --- a/spring-context/src/main/java/org/springframework/context/support/PostProcessorRegistrationDelegate.java +++ b/spring-context/src/main/java/org/springframework/context/support/PostProcessorRegistrationDelegate.java @@ -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. @@ -437,8 +437,9 @@ final class PostProcessorRegistrationDelegate { 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;