diff options
-rw-r--r-- | app/build.gradle | 8 | ||||
-rw-r--r-- | app/src/main/java/org/onap/portal/prefs/configuration/PortalPrefsConfig.java | 5 | ||||
-rw-r--r-- | app/src/main/java/org/onap/portal/prefs/controller/PreferencesController.java | 4 | ||||
-rw-r--r-- | app/src/main/java/org/onap/portal/prefs/util/Logger.java | 11 | ||||
-rw-r--r-- | app/src/test/resources/application.yml | 9 | ||||
-rw-r--r-- | openapi/build.gradle | 8 | ||||
-rw-r--r-- | settings.gradle | 4 |
7 files changed, 24 insertions, 25 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 diff --git a/openapi/build.gradle b/openapi/build.gradle index 11c0592..7b7775a 100644 --- a/openapi/build.gradle +++ b/openapi/build.gradle @@ -9,8 +9,9 @@ repositories { } dependencies { - implementation 'org.openapitools:openapi-generator:6.6.0' - implementation 'org.springframework.boot:spring-boot-starter-webflux:2.7.3' + implementation 'org.openapitools:openapi-generator:7.0.0-beta' + implementation 'org.springframework.boot:spring-boot-starter-webflux:3.1.2' + implementation 'jakarta.validation:jakarta.validation-api:3.0.2' constraints { implementation('io.swagger.core.v3:swagger-annotations:2.2.5') { @@ -33,7 +34,8 @@ openApiGenerate { interfaceOnly: "true", useTags: "true", useOptional: "true", - reactive: "true" + reactive: "true", + useSpringBoot3: "true" ] generateApiTests = false generateApiDocumentation = false diff --git a/settings.gradle b/settings.gradle index 5477589..1c146af 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,11 +3,11 @@ pluginManagement { // https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_version_management plugins { id 'io.spring.dependency-management' version '1.0.13.RELEASE' - id 'org.springframework.boot' version '2.7.3' + id 'org.springframework.boot' version '3.1.2' id 'org.sonarqube' version '3.4.0.2513' id 'com.github.hierynomus.license' version '0.16.1' id 'com.gorylenko.gradle-git-properties' version '2.4.1' - id 'org.openapi.generator' version '6.6.0' + id 'org.openapi.generator' version '7.0.0-beta' } // https://docs.gradle.org/current/userguide/plugins.html#sec:custom_plugin_repositories repositories { |