From 781f89bc1cb2e439527e3b4d604b0387eb851cba Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 10 Jul 2024 16:33:52 +0200 Subject: [PATCH] splitter: 1.0.0 - UPDATE 001 --- Dockerfile | 2 +- pom.xml | 32 ++++++++++++++++--- .../splitter/SplitterStreamProcessor.java | 4 +-- src/main/resources/application.properties | 2 -- src/main/resources/application.yml | 7 ++++ src/test/resources/logback-test.xml | 5 +++ 6 files changed, 42 insertions(+), 10 deletions(-) delete mode 100644 src/main/resources/application.properties create mode 100644 src/main/resources/application.yml create mode 100644 src/test/resources/logback-test.xml diff --git a/Dockerfile b/Dockerfile index 803477f..3a77a14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:11-jre-slim +FROM eclipse-temurin:21-jre COPY target/*.jar /opt/app.jar EXPOSE 8086 ENTRYPOINT ["java", "-jar", "/opt/app.jar"] diff --git a/pom.xml b/pom.xml index 54df55f..f9ff08c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,18 +5,17 @@ org.springframework.boot spring-boot-starter-parent - 2.5.4 + 3.2.7 de.juplo.kafka.wordcount splitter - 1.0.0 + 1.0.0.001 Wordcount-Splitter Stream-processor of the multi-user wordcount-example, that splits the sentences up into single words - 0.33.0 - 11 - 2.8.0 + 21 + 0.44.0 @@ -31,6 +30,10 @@ org.apache.kafka kafka-streams + + org.springframework.kafka + spring-kafka + org.springframework.boot @@ -48,15 +51,34 @@ lombok true + org.springframework.boot spring-boot-starter-test test + + org.springframework.kafka + spring-kafka-test + test + + + org.awaitility + awaitility + test + + + org.assertj + assertj-core + test + + + maven-failsafe-plugin + org.springframework.boot spring-boot-maven-plugin diff --git a/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java index 7218d6f..3eca8f4 100644 --- a/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java +++ b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterStreamProcessor.java @@ -11,8 +11,8 @@ import org.springframework.boot.SpringApplication; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; import java.util.Arrays; import java.util.Properties; import java.util.concurrent.CompletableFuture; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 3046fc3..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.port=8086 -management.endpoints.web.exposure.include=* diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..385daaa --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,7 @@ +server: + port: 8086 +management: + endpoints: + web: + exposure: + include: "*" diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 0000000..6f4bdf8 --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,5 @@ + + + + + -- 2.20.1