From 41b38bf2d5df24fdcad2cb45a6e6a400fe6c371f Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 13 Mar 2026 21:45:45 +0100 Subject: [PATCH] Migration Spring-Boot 3.4.1 -> 4.0.2 (producer/spring-producer) --- build.gradle | 3 ++- pom.xml | 9 +++++++-- src/test/java/de/juplo/kafka/ApplicationTests.java | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index c94cf00b..081a7eaf 100644 --- a/build.gradle +++ b/build.gradle @@ -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 3c3c4d2a..29a79b6a 100644 --- a/pom.xml +++ b/pom.xml @@ -54,8 +54,13 @@ test - org.springframework.kafka - spring-kafka + org.springframework.boot + spring-boot-starter-webmvc-test + test + + + org.springframework.boot + spring-boot-starter-kafka test diff --git a/src/test/java/de/juplo/kafka/ApplicationTests.java b/src/test/java/de/juplo/kafka/ApplicationTests.java index 29ca80a7..68d2a8ad 100644 --- a/src/test/java/de/juplo/kafka/ApplicationTests.java +++ b/src/test/java/de/juplo/kafka/ApplicationTests.java @@ -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; -- 2.39.5