From: Kai Moritz Date: Tue, 12 Nov 2024 03:03:29 +0000 (+0100) Subject: `Application` in `ExampleConsumer` umbenannt -- MOVE X-Git-Tag: spring/supersimple-consumer--2024-11-13--si~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=0defe03302701e265c24e8460a336c3a550b99f5;p=demos%2Fkafka%2Ftraining `Application` in `ExampleConsumer` umbenannt -- MOVE --- diff --git a/src/main/java/de/juplo/kafka/Application.java b/src/main/java/de/juplo/kafka/Application.java deleted file mode 100644 index e3219c1..0000000 --- a/src/main/java/de/juplo/kafka/Application.java +++ /dev/null @@ -1,24 +0,0 @@ -package de.juplo.kafka; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.kafka.annotation.KafkaListener; - -// tag::supersimple[] -@SpringBootApplication -@Slf4j -public class Application -{ - @KafkaListener(id = "supersimple", topics = "test") - public void recieve(String message) - { - log.info("Recieved message: {}", message); - } - - public static void main(String[] args) - { - SpringApplication.run(Application.class, args); - } -} -// end::supersimple[] diff --git a/src/main/java/de/juplo/kafka/ExampleConsumer.java b/src/main/java/de/juplo/kafka/ExampleConsumer.java new file mode 100644 index 0000000..e3219c1 --- /dev/null +++ b/src/main/java/de/juplo/kafka/ExampleConsumer.java @@ -0,0 +1,24 @@ +package de.juplo.kafka; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.kafka.annotation.KafkaListener; + +// tag::supersimple[] +@SpringBootApplication +@Slf4j +public class Application +{ + @KafkaListener(id = "supersimple", topics = "test") + public void recieve(String message) + { + log.info("Recieved message: {}", message); + } + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } +} +// end::supersimple[]