]> juplo.de Git - demos/kafka/training/commitdiff
Migration Spring-Boot 3.4.1 -> 4.0.2 (consumer/nodlt)
authorKai Moritz <kai@juplo.de>
Sat, 21 Mar 2026 12:39:21 +0000 (13:39 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 22 Mar 2026 20:47:38 +0000 (21:47 +0100)
build.gradle
pom.xml
src/test/java/de/juplo/kafka/ApplicationTests.java

index 6fd9cc94dd2b5e2b4320a068e7de25c8668275c7..0745919a9b3abb77c73f23b756e84c9becea5f53 100644 (file)
@@ -38,6 +38,8 @@ dependencies {
        testImplementation 'org.springframework.boot:spring-boot-starter-test'
        testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
        testImplementation 'org.springframework.boot:spring-boot-starter-kafka-test'
+       testImplementation 'org.springframework.boot:spring-boot-restclient'
+       testImplementation 'org.springframework.boot:spring-boot-resttestclient'
        testImplementation 'com.jayway.jsonpath:json-path'
        testCompileOnly 'org.projectlombok:lombok'
        testAnnotationProcessor 'org.projectlombok:lombok'
diff --git a/pom.xml b/pom.xml
index f47dafab2731d43a37df8b9210974a614a5a7863..d337686bd4d996387383764c53b18bb17cf7868f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
       <artifactId>spring-boot-starter-kafka-test</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-restclient</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-resttestclient</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>com.jayway.jsonpath</groupId>
       <artifactId>json-path</artifactId>
index f666b8bd4424a2a14cf75d42ab9d5751c869d318..314535a01f68ae5692528cb50e8896107eb5db50 100644 (file)
@@ -4,6 +4,7 @@ import com.jayway.jsonpath.JsonPath;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.resttestclient.TestRestTemplate;
+import org.springframework.boot.resttestclient.autoconfigure.AutoConfigureTestRestTemplate;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.HttpStatusCode;
@@ -25,6 +26,7 @@ import static org.assertj.core.api.Assertions.assertThat;
   })
 @DirtiesContext
 @EmbeddedKafka(topics = TOPIC, partitions = NUM_PARTITIONS)
+@AutoConfigureTestRestTemplate
 public class ApplicationTests
 {
   @Test