From: Kai Moritz Date: Wed, 10 Jul 2024 14:40:41 +0000 (+0200) Subject: top10: 1.0.1 - UPDATE 001 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=c2483d85e9977bd71bc75048d0f4ef60580d737d;p=demos%2Fkafka%2Fwordcount top10: 1.0.1 - UPDATE 001 --- diff --git a/Dockerfile b/Dockerfile index 899fd4b..ae0723d 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 8084 ENTRYPOINT ["java", "-jar", "/opt/app.jar"] diff --git a/pom.xml b/pom.xml index 818687f..0ba9552 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 top10 - 1.0.1 + 1.0.1.001 Wordcount-Top-10 Top-10 stream-processor of the multi-user wordcount-example - 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/top10/Top10StreamProcessor.java b/src/main/java/de/juplo/kafka/wordcount/top10/Top10StreamProcessor.java index 862913a..2ae3ec5 100644 --- a/src/main/java/de/juplo/kafka/wordcount/top10/Top10StreamProcessor.java +++ b/src/main/java/de/juplo/kafka/wordcount/top10/Top10StreamProcessor.java @@ -2,6 +2,8 @@ package de.juplo.kafka.wordcount.top10; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; import lombok.extern.slf4j.Slf4j; import org.apache.kafka.clients.consumer.ConsumerConfig; import org.apache.kafka.common.serialization.Serdes; @@ -13,8 +15,6 @@ import org.springframework.boot.SpringApplication; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.stereotype.Component; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; import java.util.Properties; import java.util.concurrent.CompletableFuture; import java.util.regex.Pattern;