You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GH-3467: Fix KafkaListenerAnnotationBeanPostProcessor for early BF access (#3468)
Fixes: #3467#3467
The `KafkaListenerAnnotationBeanPostProcessor.afterPropertiesSet()` gets 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 not to have any bean factory access from `BeanPostProcessor` initialization phase.
* Fix `KafkaListenerAnnotationBeanPostProcessor` to `buildEnhancer()` in lazy manner.
Therefore remove an `afterPropertiesSet()` altogether.
(cherry picked from commit 4a135a1)
Copy file name to clipboardExpand all lines: spring-kafka/src/main/java/org/springframework/kafka/annotation/KafkaListenerAnnotationBeanPostProcessor.java
0 commit comments