diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java index 85329985b5..40895af155 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/kafka/KafkaAutoConfiguration.java @@ -86,13 +86,13 @@ public class KafkaAutoConfiguration { @Bean @ConditionalOnMissingBean(ProducerListener.class) - public ProducerListener kafkaProducerListener() { + public LoggingProducerListener kafkaProducerListener() { return new LoggingProducerListener<>(); } @Bean @ConditionalOnMissingBean(ConsumerFactory.class) - public ConsumerFactory kafkaConsumerFactory( + public DefaultKafkaConsumerFactory kafkaConsumerFactory( ObjectProvider customizers) { DefaultKafkaConsumerFactory factory = new DefaultKafkaConsumerFactory<>( this.properties.buildConsumerProperties()); @@ -102,7 +102,7 @@ public class KafkaAutoConfiguration { @Bean @ConditionalOnMissingBean(ProducerFactory.class) - public ProducerFactory kafkaProducerFactory( + public DefaultKafkaProducerFactory kafkaProducerFactory( ObjectProvider customizers) { DefaultKafkaProducerFactory factory = new DefaultKafkaProducerFactory<>( this.properties.buildProducerProperties());