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
Fix KafkaListenerAnnotationBeanPostProcessor to buildEnhancer() i lazy manner. Therefore remove an afterPropertiesSet() altogether
Fixes: #3467
The
KafkaListenerAnnotationBeanPostProcessor.afterPropertiesSet()
get access toBeanFactory
for other beans which causes a warning into logs like:The rule of thumb is to not have any bean factory access from
BeanPostProcessor
initialization phaseKafkaListenerAnnotationBeanPostProcessor
tobuildEnhancer()
i lazy manner. Therefore remove anafterPropertiesSet()
altogetherAuto-cherry-pick to
3.2.x
&3.1.x