Upgrade auf Spring Boot 3.3.4
authorKai Moritz <kai@juplo.de>
Wed, 25 Sep 2024 12:20:34 +0000 (14:20 +0200)
committerKai Moritz <kai@juplo.de>
Thu, 26 Sep 2024 08:42:01 +0000 (10:42 +0200)
pom.xml
src/main/java/de/juplo/kafka/Application.java
src/main/java/de/juplo/kafka/ApplicationProperties.java
src/main/java/de/juplo/kafka/ExampleProducer.java

diff --git a/pom.xml b/pom.xml
index 1e92e49..fd2b10b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
   <parent>
     <groupId>org.springframework.boot</groupId>
     <artifactId>spring-boot-starter-parent</artifactId>
-    <version>2.7.2</version>
+    <version>3.3.4</version>
     <relativePath/> <!-- lookup parent from repository -->
   </parent>
 
@@ -19,7 +19,6 @@
 
   <properties>
     <java.version>17</java.version>
-    <lombok.version>1.18.30</lombok.version>
   </properties>
 
   <dependencies>
index 0069257..ba6aeee 100644 (file)
@@ -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)
index 673613a..8efacd4 100644 (file)
@@ -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")
index c6e8485..94608f9 100644 (file)
@@ -12,8 +12,7 @@ import java.math.BigInteger;
 
 
 @Slf4j
-@RequestMapping
-@ResponseBody
+@RestController
 @RequiredArgsConstructor
 public class ExampleProducer
 {