From fa8267ba827e7205d2de67c056a29c37203c54f9 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 25 Sep 2024 19:13:05 +0200 Subject: [PATCH] Einheitliche Benennung des Producers -- ALIGN --- src/main/java/de/juplo/kafka/ApplicationConfiguration.java | 4 ++-- src/main/java/de/juplo/kafka/ExampleProducer.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java index 0642aa4..132413c 100644 --- a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java +++ b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java @@ -14,12 +14,12 @@ import java.util.Properties; public class ApplicationConfiguration { @Bean - public RestProducer restProducer( + public ExampleProducer exampleProducer( ApplicationProperties properties, KafkaProducer kafkaProducer) { return - new RestProducer( + new ExampleProducer( properties.getClientId(), properties.getTopic(), properties.getPartition(), diff --git a/src/main/java/de/juplo/kafka/ExampleProducer.java b/src/main/java/de/juplo/kafka/ExampleProducer.java index cecb980..c6e8485 100644 --- a/src/main/java/de/juplo/kafka/ExampleProducer.java +++ b/src/main/java/de/juplo/kafka/ExampleProducer.java @@ -3,7 +3,6 @@ package de.juplo.kafka; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.kafka.clients.producer.Producer; -import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; @@ -16,7 +15,7 @@ import java.math.BigInteger; @RequestMapping @ResponseBody @RequiredArgsConstructor -public class RestProducer +public class ExampleProducer { private final String id; private final String topic; -- 2.20.1