Skip to content

Commit

Permalink
Merge pull request #32770 from YuanHao97
Browse files Browse the repository at this point in the history
* pr/32770:
  Polish 'Use more specific bean method return types in KafkaAutoConfiguration'
  Use more specific bean method return types in KafkaAutoConfiguration

Closes gh-32770
  • Loading branch information
philwebb committed Oct 18, 2022
2 parents a92388c + b02c702 commit e35de71
Showing 1 changed file with 4 additions and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,13 +75,13 @@ public KafkaAutoConfiguration(KafkaProperties properties) {

@Bean
@ConditionalOnMissingBean(ProducerListener.class)
public ProducerListener<Object, Object> kafkaProducerListener() {
public LoggingProducerListener<Object, Object> kafkaProducerListener() {
return new LoggingProducerListener<>();
}

@Bean
@ConditionalOnMissingBean(ConsumerFactory.class)
public ConsumerFactory<?, ?> kafkaConsumerFactory(
public DefaultKafkaConsumerFactory<?, ?> kafkaConsumerFactory(
ObjectProvider<DefaultKafkaConsumerFactoryCustomizer> customizers) {
DefaultKafkaConsumerFactory<Object, Object> factory = new DefaultKafkaConsumerFactory<>(
this.properties.buildConsumerProperties());
Expand All @@ -91,7 +91,7 @@ public ProducerListener<Object, Object> kafkaProducerListener() {

@Bean
@ConditionalOnMissingBean(ProducerFactory.class)
public ProducerFactory<?, ?> kafkaProducerFactory(
public DefaultKafkaProducerFactory<?, ?> kafkaProducerFactory(
ObjectProvider<DefaultKafkaProducerFactoryCustomizer> customizers) {
DefaultKafkaProducerFactory<?, ?> factory = new DefaultKafkaProducerFactory<>(
this.properties.buildProducerProperties());
Expand Down

0 comments on commit e35de71

Please sign in to comment.