spring-projects / spring-kafka

Provides Familiar Spring Abstractions for Apache Kafka
https://projects.spring.io/spring-kafka
Apache License 2.0
2.17k stars 1.55k forks source link

GH-3467: Fix KafkaListenerAnnotationBeanPostProcessor for early BF access #3468

Closed artembilan closed 1 month ago

artembilan commented 1 month ago

Fixes: #3467

The KafkaListenerAnnotationBeanPostProcessor.afterPropertiesSet() get access to BeanFactory for other beans which causes a warning into logs like:

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

The rule of thumb is to not have any bean factory access from BeanPostProcessor initialization phase

Auto-cherry-pick to 3.2.x & 3.1.x