From 28850595c834c08f2d296b7f65adfe7f248561a6 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 25 Sep 2024 14:20:34 +0200 Subject: [PATCH] Upgrade auf Spring Boot 3.3.4 --- pom.xml | 3 +-- src/main/java/de/juplo/kafka/Application.java | 3 +++ src/main/java/de/juplo/kafka/ApplicationProperties.java | 4 ++-- src/main/java/de/juplo/kafka/ExampleProducer.java | 3 +-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1e92e49..fd2b10b 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.springframework.boot spring-boot-starter-parent - 2.7.2 + 3.3.4 @@ -19,7 +19,6 @@ 17 - 1.18.30 diff --git a/src/main/java/de/juplo/kafka/Application.java b/src/main/java/de/juplo/kafka/Application.java index 0069257..ba6aeee 100644 --- a/src/main/java/de/juplo/kafka/Application.java +++ b/src/main/java/de/juplo/kafka/Application.java @@ -2,9 +2,12 @@ package de.juplo.kafka; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.bind.annotation.RestController; @SpringBootApplication +@ComponentScan(excludeFilters = @ComponentScan.Filter(RestController.class)) public class Application { public static void main(String[] args) diff --git a/src/main/java/de/juplo/kafka/ApplicationProperties.java b/src/main/java/de/juplo/kafka/ApplicationProperties.java index 673613a..8efacd4 100644 --- a/src/main/java/de/juplo/kafka/ApplicationProperties.java +++ b/src/main/java/de/juplo/kafka/ApplicationProperties.java @@ -1,11 +1,11 @@ package de.juplo.kafka; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; import lombok.Getter; import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; @ConfigurationProperties(prefix = "producer") diff --git a/src/main/java/de/juplo/kafka/ExampleProducer.java b/src/main/java/de/juplo/kafka/ExampleProducer.java index c6e8485..94608f9 100644 --- a/src/main/java/de/juplo/kafka/ExampleProducer.java +++ b/src/main/java/de/juplo/kafka/ExampleProducer.java @@ -12,8 +12,7 @@ import java.math.BigInteger; @Slf4j -@RequestMapping -@ResponseBody +@RestController @RequiredArgsConstructor public class ExampleProducer { -- 2.20.1