From: Kai Moritz Date: Sun, 27 Oct 2024 13:05:17 +0000 (+0100) Subject: In der Configuration wird das Interface des `KafkaProducer` übergeben X-Git-Tag: producer/spring-producer--2024-11-13--si~9 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=6b3067d5348bb2b802ebf76c726820eca0ba182c;p=demos%2Fkafka%2Ftraining In der Configuration wird das Interface des `KafkaProducer` übergeben --- diff --git a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java index 663b7cb..835e796 100644 --- a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java +++ b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java @@ -1,6 +1,7 @@ package de.juplo.kafka; import org.apache.kafka.clients.producer.KafkaProducer; +import org.apache.kafka.clients.producer.Producer; import org.apache.kafka.common.serialization.StringSerializer; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -16,7 +17,7 @@ public class ApplicationConfiguration @Bean public ExampleProducer exampleProducer( ApplicationProperties properties, - KafkaProducer kafkaProducer) + Producer kafkaProducer) { return new ExampleProducer(