diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-07-24 12:51:13 +0000 |
---|---|---|
committer | Fiete Ostkamp <fiete.ostkamp@telekom.de> | 2023-07-25 14:06:19 +0000 |
commit | 6ae8df1305d1374af3b5ffe8ecb4c5ce3e17260d (patch) | |
tree | 2b448b60b0a81f1b9f4d2b93d644fe9bc7eb0a2f /app | |
parent | 61040e8e7b631b4ddd800ee0eb1622df1ef157d3 (diff) |
Upgrade preferences to Spring Boot 3
Issue-ID: PORTALNG-25
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I6b057a9ad4518c507406282cd9d095860017a0cf
Diffstat (limited to 'app')
5 files changed, 17 insertions, 20 deletions
diff --git a/app/build.gradle b/app/build.gradle index a640b59..1d51c30 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,9 +37,9 @@ repositories { ext { problemVersion = '0.27.1' logstashLogbackVersion = '7.2' - embedMongoVersion = '3.2.8' - embedMongoIntegrationVersion = '1.1.0-spring27x' - springCloudWiremockVersion = '3.1.0' + embedMongoVersion = '4.7.0' + embedMongoIntegrationVersion = '4.7.0' + springCloudWiremockVersion = '4.0.3' } dependencies { @@ -65,7 +65,7 @@ dependencies { testImplementation 'io.rest-assured:rest-assured' testImplementation "org.springframework.cloud:spring-cloud-contract-wiremock:$springCloudWiremockVersion" testImplementation "de.flapdoodle.embed:de.flapdoodle.embed.mongo:$embedMongoVersion" - testImplementation "de.flapdoodle.embed:de.flapdoodle.embed.mongo.spring:$embedMongoIntegrationVersion" + testImplementation "de.flapdoodle.embed:de.flapdoodle.embed.mongo.spring30x:$embedMongoIntegrationVersion" testCompileOnly 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java b/app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java index 3c03673..2d415cd 100644 --- a/app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java +++ b/app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java @@ -21,15 +21,12 @@ package org.onap.portal.prefs.configuration; -import javax.validation.constraints.NotBlank; - import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.ConstructorBinding; +import jakarta.validation.constraints.NotBlank; import lombok.Data; @Data -@ConstructorBinding @ConfigurationProperties("portal-prefs") public class PortalPrefsConfig { diff --git a/app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java b/app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java index 510ef37..f2ae7f9 100644 --- a/app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java +++ b/app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java @@ -20,10 +20,6 @@ */ package org.onap.portal.prefs.controller; - - -import javax.validation.Valid; - import org.onap.portal.prefs.exception.ProblemException; import org.onap.portal.prefs.openapi.api.PreferencesApi; import org.onap.portal.prefs.openapi.model.Preferences; diff --git a/app/src/main/java/org/onap/portal/prefs/util/Logger.java b/app/src/main/java/org/onap/portal/prefs/util/Logger.java index 4f4ac6c..4026b9f 100644 --- a/app/src/main/java/org/onap/portal/prefs/util/Logger.java +++ b/app/src/main/java/org/onap/portal/prefs/util/Logger.java @@ -21,11 +21,12 @@ package org.onap.portal.prefs.util; -import lombok.extern.slf4j.Slf4j; +import java.net.URI; + import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; -import java.net.URI; +import lombok.extern.slf4j.Slf4j; @Slf4j public class Logger { @@ -36,8 +37,8 @@ public class Logger { log.info("Portal-prefs - request - X-Request-Id {} {} {}", xRequestId, methode, path); } - public static void responseLog(String xRequestId, HttpStatus code) { - log.info("Portal-prefs - response - X-Request-Id {} {}", xRequestId, code); + public static void responseLog(String xRequestId, HttpStatusCode httpStatusCode) { + log.info("Portal-prefs - response - X-Request-Id {} {}", xRequestId, httpStatusCode); } public static void errorLog(String xRequestId, String msg, String id, String app) { diff --git a/app/src/test/resources/application.yml b/app/src/test/resources/application.yml index 3316c0d..bdfadf4 100644 --- a/app/src/test/resources/application.yml +++ b/app/src/test/resources/application.yml @@ -2,10 +2,13 @@ server: port: 9001 address: 0.0.0.0 +de: + flapdoodle: + mongodb: + embedded: + version: 5.0.15 + spring: - mongodb: - embedded: - version: 3.2.8 jackson: serialization: # needed for serializing objects of type object |