GH-1808: Refine ignored properties

Related to https://github.com/spring-projects/spring-kafka/issues/1808

Turns out we also need to ignore a deprecated `setConsumerProperties`
when `BeanUtils.copyProperties()` still sets the value by reflection

**Cherry-pick to `2.3.x`**
This commit is contained in:
Artem Bilan
2021-05-21 16:02:20 -04:00
parent 4f68b35bd2
commit 110f48fc99

View File

@@ -376,7 +376,7 @@ public abstract class AbstractKafkaListenerContainerFactory<C extends AbstractMe
protected void initializeContainer(C instance, KafkaListenerEndpoint endpoint) {
ContainerProperties properties = instance.getContainerProperties();
BeanUtils.copyProperties(this.containerProperties, properties, "topics", "topicPartitions", "topicPattern",
"messageListener", "ackCount", "ackTime", "kafkaConsumerProperties");
"messageListener", "ackCount", "ackTime", "consumerProperties", "kafkaConsumerProperties");
JavaUtils.INSTANCE
.acceptIfNotNull(this.afterRollbackProcessor, instance::setAfterRollbackProcessor)
.acceptIfCondition(this.containerProperties.getAckCount() > 0, this.containerProperties.getAckCount(),