query: 1.0.4 - UPDATE 001 query-1.0.4
authorKai Moritz <kai@juplo.de>
Wed, 10 Jul 2024 14:17:01 +0000 (16:17 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 10 Jul 2024 14:19:46 +0000 (16:19 +0200)
Dockerfile
pom.xml
src/main/java/de/juplo/kafka/wordcount/query/QueryStreamProcessor.java

index 10b89f6..640032a 100644 (file)
@@ -1,4 +1,4 @@
-FROM openjdk:11-jre-slim
+FROM eclipse-temurin:21-jre
 COPY target/*.jar /opt/app.jar
 EXPOSE 8085
 ENTRYPOINT ["java", "-jar", "/opt/app.jar"]
diff --git a/pom.xml b/pom.xml
index 3f487dd..5eea2c9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -5,18 +5,17 @@
        <parent>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
-               <version>2.5.4</version>
+               <version>3.2.7</version>
                <relativePath/> <!-- lookup parent from repository -->
        </parent>
        <groupId>de.juplo.kafka.wordcount</groupId>
        <artifactId>query</artifactId>
-       <version>1.0.4</version>
+       <version>1.0.4.001</version>
        <name>Wordcount-Query</name>
        <description>Query stream-processor of the multi-user wordcount-example</description>
        <properties>
-               <docker-maven-plugin.version>0.33.0</docker-maven-plugin.version>
-               <java.version>11</java.version>
-               <kafka.version>2.8.0</kafka.version>
+               <java.version>21</java.version>
+               <docker-maven-plugin.version>0.44.0</docker-maven-plugin.version>
        </properties>
        <dependencies>
                <dependency>
                        <groupId>org.apache.kafka</groupId>
                        <artifactId>kafka-streams</artifactId>
                </dependency>
+               <dependency>
+                       <groupId>org.springframework.kafka</groupId>
+                       <artifactId>spring-kafka</artifactId>
+               </dependency>
 
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-test</artifactId>
                        <scope>test</scope>
                </dependency>
+               <dependency>
+                       <groupId>org.springframework.kafka</groupId>
+                       <artifactId>spring-kafka-test</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.assertj</groupId>
+                       <artifactId>assertj-core</artifactId>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
 
        <build>
                <plugins>
+                       <plugin>
+                               <artifactId>maven-failsafe-plugin</artifactId>
+                       </plugin>
                        <plugin>
                                <groupId>org.springframework.boot</groupId>
                                <artifactId>spring-boot-maven-plugin</artifactId>
index 7e7af21..fed75b3 100644 (file)
@@ -2,6 +2,8 @@ package de.juplo.kafka.wordcount.query;
 
 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;
@@ -15,8 +17,6 @@ import org.apache.kafka.streams.state.ReadOnlyKeyValueStore;
 import org.springframework.boot.SpringApplication;
 import org.springframework.context.ConfigurableApplicationContext;
 
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
 import java.net.URI;
 import java.util.Optional;
 import java.util.Properties;