Hi,
I generated a simple Spring Boot 3.2.1 project using aop and web-services starters. Implemented some bean post pocessor (BPP) and custom advisor(AOP). When I run the project, I faced warnings mentioned below:
2024-01-17T23:49:39.628+04:00 WARN 19416 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'customConfiguration' of type [com.spring.example.demo.advisors.CustomConfiguration$$SpringCGLIB$$0] 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 [customBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-01-17T23:49:39.641+04:00 WARN 19416 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'advisorBean' of type [org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor] 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 [customBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
As far as I understand, there are no any explicit dependency between bean post processor and advisor that defined in the demo application.
Are there any suggestions about how best to tackle the problem and get off of the warnings?
The MRE you can find below: https://github.com/vaghav/spring-boot-warning-mre
Thanks a lot!
Comment From: wilkinsona
Those log messages are generated by Spring Framework and are out of Spring Boot's control. As they say, you should check the declaration of your customBeanPostProcessor. I would recommend reading https://docs.spring.io/spring-framework/reference/core/beans/factory-extension.html#beans-factory-extension-bpp and applying any recommendations that it makes. If that does not help you may want to follow up on Stack Overflow or, if you think improvements to the log message could be made, on the Spring Framework issue tracker.