有谁知道如何解决这个问题吗? 我只需在类路径中添加“spring-cloud-loadbalancer”即可收到此警告。
日志:
022-09-20 14:38:15,199 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-09-20 14:38:15,201 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-09-20 14:38:15,206 INFO [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: Bean 'reactorDeferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
这些警告是由Spring Cloud Load Balancer的自动配置代码产生的。有一个开放的拉取请求来修复它:https://github.com/spring-cloud/spring-cloud-commons/pull/1361
好的一面是,警告并不表明这种特殊情况下存在实际问题。
同时,您可以禁用自动配置并以不会产生这些警告的方式重新实现它,但这既不实际也不真正可取。
或者您可以通过将
org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker
的记录器日志级别设置为 ERROR
来消除任何此类警告,这样它就不会记录警告。这样做的代价是您看不到任何此类警告,这可能会禁用您可能希望看到的其他配置的警告。