Resolve bean post processor warnings#1361
Resolve bean post processor warnings#1361OlgaMaciaszek merged 1 commit intospring-cloud:mainfrom hpoettker:resolve-warnings
Conversation
OlgaMaciaszek
left a comment
There was a problem hiding this comment.
Hello @hpoettker thanks for the PR. Looks good. Please add your full name and surname with the @author tag the javadocs of all the classes you've modified.
|
@OlgaMaciaszek done |
This reverts commit 4e6540b. # Conflicts: # spring-cloud-commons/src/main/java/org/springframework/cloud/client/loadbalancer/reactive/LoadBalancerBeanPostProcessorAutoConfiguration.java
|
@hpoettker Had to revert these changes as, unfortunately, they were messing up native images: https://ge.spring.io/s/elz5iwbaoj2me . Have tried using an |
This reverts commit 246bc32.
|
@OlgaMaciaszek Thanks for the notice. I think we've run into spring-projects/spring-framework#29309. I could reproduce the problem locally. The Are you interested in a PR with the |
Introduction
The PR resolves the remaining warnings about beans not being eligible for getting processed by all
BeanPostProcessors. Similar warnings have been reported in #1315 and fixed in #1319.The warnings do not indicate a severe issue. But they lead to confusion among users and bad getting started experiences. And as the size of the PR shows, the required change is rather small.
Reproducing the issue
The effectiveness of the change can be seen in the following tests:
LoadBalancerRequestFactoryConfigurationTestsReactorLoadBalancerClientAutoConfigurationTestsWithout the change, the test
LoadBalancerRequestFactoryConfigurationTestslogs the following warnings:Without the change, the test
ReactorLoadBalancerClientAutoConfigurationTestslogs the following warnings:With the change, no such warnings appear.
How it works
The PR works by using two mechanisms:
static, the respective configuration class no longer needs to be instantiated before the methods are invoked.DeferringLoadBalancerInterceptororDeferringLoadBalancerExchangeFilterFunctionthemselves but only pass on references to builders. Therefore their injection points can be declared to be lazy.