From: emaclee Date: Sun, 24 Mar 2024 19:05:34 +0000 (+0000) Subject: Uplift Spring boot 3.2.4 X-Git-Tag: 3.4.7~2^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=cps.git;a=commitdiff_plain;h=ea7d1b448699d890d15fd37c69d4705a094a1b53 Uplift Spring boot 3.2.4 - uplifted spring boot from 3.1.2 to 3.2.4 - removed redundant dependencies - upgraded relevant dependencies - use of @Bean(some_name) is give a specific bean name - using @Bean(some_name) with @Qualifier so on the injection point to specify which bean to actually inject, this is used as we deal with multiple beans of the same type. Issue-ID: CPS-2101 Change-Id: I64d5bf567b9eb03fb39034a46528d0160b332715 Signed-off-by: emaclee --- diff --git a/cps-application/pom.xml b/cps-application/pom.xml index ac75c0b8e..cf90ac8cc 100644 --- a/cps-application/pom.xml +++ b/cps-application/pom.xml @@ -69,14 +69,6 @@ org.eclipse.jetty jetty-server - - org.eclipse.jetty - jetty-http - - - jakarta.servlet - jakarta.servlet-api - io.micrometer micrometer-registry-prometheus @@ -124,12 +116,6 @@ org.springframework.boot spring-boot-starter-test test - - - org.junit.vintage - junit-vintage-engine - - diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml index d74248351..3c263e381 100644 --- a/cps-application/src/main/resources/application.yml +++ b/cps-application/src/main/resources/application.yml @@ -64,7 +64,7 @@ spring: liquibase: change-log: classpath:changelog/changelog-master.yaml - labels: ${LIQUIBASE_LABELS} + label-filter: ${LIQUIBASE_LABELS} servlet: multipart: diff --git a/cps-dependencies/pom.xml b/cps-dependencies/pom.xml index 68f36fb83..fd3cb5838 100644 --- a/cps-dependencies/pom.xml +++ b/cps-dependencies/pom.xml @@ -75,7 +75,7 @@ org.springdoc springdoc-openapi-starter-webmvc-ui - 2.0.2 + 2.4.0 org.springdoc @@ -85,22 +85,17 @@ org.springframework.boot spring-boot-dependencies - 3.1.2 + 3.2.4 pom import org.springframework.cloud spring-cloud-dependencies - 2022.0.3 + 2023.0.0 pom import - - org.springframework - spring-test - 6.0.11 - io.springfox springfox-boot-starter @@ -109,7 +104,7 @@ org.springframework.boot spring-boot-starter-cache - 3.1.2 + 3.2.4 @@ -172,8 +167,8 @@ io.hypersistence - hypersistence-utils-hibernate-60 - 3.5.0 + hypersistence-utils-hibernate-63 + 3.7.3 io.micrometer @@ -215,16 +210,6 @@ groovy ${groovy.version} - - org.eclipse.jetty - jetty-server - ${jetty-version} - - - org.eclipse.jetty - jetty-http - ${jetty-version} - org.codehaus.janino janino @@ -240,11 +225,6 @@ annotations 22.0.0 - - org.junit.jupiter - junit-jupiter-api - 5.10.0 - org.liquibase liquibase-core diff --git a/cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml b/cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml index 350bb00ff..c62002b6c 100644 --- a/cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml +++ b/cps-ncmp-rest-stub/cps-ncmp-rest-stub-service/pom.xml @@ -1,6 +1,6 @@ org.spockframework @@ -65,12 +57,6 @@ org.springframework.boot spring-boot-starter-test test - - - org.junit.vintage - junit-vintage-engine - - org.spockframework diff --git a/cps-ncmp-rest/lombok.config b/cps-ncmp-rest/lombok.config index 041897443..f5a2cabf4 100644 --- a/cps-ncmp-rest/lombok.config +++ b/cps-ncmp-rest/lombok.config @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2021 Nordix Foundation +# Copyright (C) 2021-2024 Nordix Foundation # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,4 +17,5 @@ # ============LICENSE_END========================================================= config.stopBubbling = true -lombok.addLombokGeneratedAnnotation = true \ No newline at end of file +lombok.addLombokGeneratedAnnotation = true +lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier \ No newline at end of file diff --git a/cps-ncmp-rest/pom.xml b/cps-ncmp-rest/pom.xml index 7e03120c6..de94ee0b7 100644 --- a/cps-ncmp-rest/pom.xml +++ b/cps-ncmp-rest/pom.xml @@ -1,7 +1,7 @@ io.hypersistence - hypersistence-utils-hibernate-60 + hypersistence-utils-hibernate-63 org.projectlombok @@ -118,12 +118,6 @@ org.springframework.boot spring-boot-starter-test test - - - org.junit.vintage - junit-vintage-engine - - diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java index b0f9a2da5..17f13b81a 100755 --- a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java +++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsModulePersistenceServiceImpl.java @@ -69,6 +69,7 @@ import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource; import org.opendaylight.yangtools.yang.parser.api.YangSyntaxErrorException; import org.opendaylight.yangtools.yang.parser.rfc7950.repo.YangModelDependencyInfo; import org.springframework.dao.DataIntegrityViolationException; +import org.springframework.retry.RetryContext; import org.springframework.retry.annotation.Backoff; import org.springframework.retry.annotation.Retryable; import org.springframework.retry.support.RetrySynchronizationManager; @@ -277,8 +278,8 @@ public class CpsModulePersistenceServiceImpl implements CpsModulePersistenceServ dataIntegrityViolationException, newYangResourceEntities); convertedException.ifPresent( e -> { - int retryCount = RetrySynchronizationManager.getContext() == null ? 0 - : RetrySynchronizationManager.getContext().getRetryCount(); + final RetryContext retryContext = RetrySynchronizationManager.getContext(); + int retryCount = retryContext == null ? 0 : retryContext.getRetryCount(); log.warn("Cannot persist duplicated yang resource. System will attempt this method " + "up to 5 times. Current retry count : {}", ++retryCount, e); }); diff --git a/cps-service/pom.xml b/cps-service/pom.xml index 58716f3f1..31b308410 100644 --- a/cps-service/pom.xml +++ b/cps-service/pom.xml @@ -1,7 +1,7 @@ - - org.springframework - spring-test - test - org.codehaus.groovy groovy @@ -180,16 +175,17 @@ org.testcontainers kafka test + + + junit + junit + + org.springframework.kafka spring-kafka-test test - - org.aspectj - aspectjrt - test - diff --git a/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml b/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml index 9b424a5ef..7c7c509aa 100644 --- a/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml +++ b/dmi-plugin-demo-and-csit-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml @@ -1,7 +1,7 @@