]> juplo.de Git - demos/kafka/training/commitdiff
Migration Spring-Boot 3.4.1 -> 4.0.2 (producer/spring-producer)
authorKai Moritz <kai@juplo.de>
Fri, 13 Mar 2026 20:45:45 +0000 (21:45 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 14 Mar 2026 16:01:23 +0000 (17:01 +0100)
build.gradle
pom.xml
src/test/java/de/juplo/kafka/ApplicationTests.java

index c94cf00be42d5f33f645a383f6967b2e758e9d07..081a7eaf87e8e793a77f9ef08e798bcf342a0ab4 100644 (file)
@@ -36,7 +36,8 @@ dependencies {
        annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
        annotationProcessor 'org.projectlombok:lombok'
        testImplementation 'org.springframework.boot:spring-boot-starter-test'
-       testImplementation 'org.springframework.kafka:spring-kafka'
+       testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
+       testImplementation 'org.springframework.boot:spring-boot-starter-kafka'
        testImplementation 'org.springframework.kafka:spring-kafka-test'
        testCompileOnly 'org.projectlombok:lombok'
        testAnnotationProcessor 'org.projectlombok:lombok'
diff --git a/pom.xml b/pom.xml
index 3c3c4d2afe6a2e622700c07922ad35f3337d83ea..29a79b6aeb312b61bd3696ca428ffd760e6d086a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.springframework.kafka</groupId>
-      <artifactId>spring-kafka</artifactId>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-webmvc-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-kafka</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index 29ca80a72b637b71cc06cac4b01c3d24b48cd1d9..68d2a8add5d6213ed8162f78d29513789db93379 100644 (file)
@@ -5,9 +5,9 @@ import org.apache.kafka.clients.consumer.ConsumerRecord;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.TestConfiguration;
+import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
 import org.springframework.context.annotation.Bean;
 import org.springframework.kafka.annotation.KafkaListener;
 import org.springframework.kafka.test.context.EmbeddedKafka;