grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.47k stars 812 forks source link

Spring Framework BeanPostProcessorChecker: warning logs about BeanPostProcessors #1130

Open space88man opened 1 month ago

space88man commented 1 month ago

The context Spring Framework's BeanPostProcessorChecker has started to complain loudly (logs at WARN level) about the BeanPostProcessors in this repo.

Creating a Spring Boot application that hosts a gRPC server and uses multiple gRPC client stubs to access services. Spring Boot version: 3.3.2

Both client and server auto-configurations classes trigger the checker. The bug

Warnings:

2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker Bean 'net.d
evh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration' of type [net.devh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration]
 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 [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and 
its dependencies.

2024-07-31T10:19:01 WARNING [main] org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker Bean 'net.d
evh.boot.grpc.server.autoconfigure.GrpcServerAutoConfiguration' of type [net.devh.boot.grpc.server.autoconfigure.GrpcServerAutoConfiguration]
 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 [grpcClientBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and 
its dependencies. 

Stacktrace and logs

N/A - application does start up Steps to Reproduce

The application's environment

Which versions do you use?

Additional context

space88man commented 1 month ago

Not specific to this repo: I am seeing this warning for other autoconfiguration classes. E.g https://github.com/spring-projects/spring-boot/issues/38558. It's not a Spring Boot issue but due to changes in Spring Framework https://github.com/spring-projects/spring-boot/issues/39224#issuecomment-1896635329

Electric-impala commented 2 weeks ago

I also encountered same issue. How can we get rid off these warn logs? @space88man did you got any solution