Upgrade spring-boot to 2.4 71/141371/10
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 24 Jun 2025 11:29:47 +0000 (13:29 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Wed, 25 Jun 2025 12:28:48 +0000 (14:28 +0200)
- upgrade spring-boot (2.3.12 -> 2.4.13)
- upgrade spring-cloud (Hoxton.SR12 -> 2020.0.6)
- add dependencyManagement for grpc since it is not
  managed by spring-cloud anymore
- remove tomcat-catalina from common
- adjust url paths in test classes since spring's
  UriComponentsBuilder got stricter with the paths

Issue-ID: SO-4184
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I0f913791f621e68d5eeba797a77ec1fa89c658c0

adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/adapters/catalogdb/catalogrest/CatalogDBRestTest.java
asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java
bpmn/so-bpmn-infrastructure-flows/pom.xml
common/pom.xml
common/src/main/java/org/onap/so/security/HttpHeaderForwarderHandlerInterceptor.java
common/src/main/java/org/onap/so/spring/GracefulShutdown.java [deleted file]
common/src/main/java/org/onap/so/spring/GracefulShutdownBeans.java [deleted file]
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandlerTest.java
pom.xml

index 74ea27c..dcb0d5b 100644 (file)
@@ -8,9 +8,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -49,22 +49,22 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class CatalogDBRestTest extends CatalogDbAdapterBaseTest {
 
-    private static final String ECOMP_MSO_CATALOG_V2_VF_MODULES = "ecomp/mso/catalog/v2/vfModules";
+    private static final String ECOMP_MSO_CATALOG_V2_VF_MODULES = "/ecomp/mso/catalog/v2/vfModules";
 
-    private static final String SERVICE_RECIPE = "serviceRecipe";
+    private static final String SERVICE_RECIPE = "/serviceRecipe";
 
     private static final String ECOMP_MSO_CATALOG_V2_SERVICE_ALLOTTED_RESOURCES =
-            "ecomp/mso/catalog/v2/serviceAllottedResources";
+            "/ecomp/mso/catalog/v2/serviceAllottedResources";
 
-    private static final String ECOMP_MSO_CATALOG_V2_RESOURCE_RECEIPE = "ecomp/mso/catalog/v2/resourceRecipe";
+    private static final String ECOMP_MSO_CATALOG_V2_RESOURCE_RECEIPE = "/ecomp/mso/catalog/v2/resourceRecipe";
 
-    private static final String ECOMP_MSO_CATALOG_V2_SERVICE_NETWORKS = "ecomp/mso/catalog/v2/serviceNetworks";
+    private static final String ECOMP_MSO_CATALOG_V2_SERVICE_NETWORKS = "/ecomp/mso/catalog/v2/serviceNetworks";
 
-    private static final String ECOMP_MSO_CATALOG_V2_SERVICE_VNFS = "ecomp/mso/catalog/v2/serviceVnfs";
+    private static final String ECOMP_MSO_CATALOG_V2_SERVICE_VNFS = "/ecomp/mso/catalog/v2/serviceVnfs";
 
-    private static final String ECOMP_MSO_CATALOG_V2_SERVICE_RESOURCES = "ecomp/mso/catalog/v2/serviceResources";
+    private static final String ECOMP_MSO_CATALOG_V2_SERVICE_RESOURCES = "/ecomp/mso/catalog/v2/serviceResources";
 
-    private static final String ECOMP_MSO_CATALOG_PROCESSING_FLAGS = "ecomp/mso/catalog/v2/processingFlags";
+    private static final String ECOMP_MSO_CATALOG_PROCESSING_FLAGS = "/ecomp/mso/catalog/v2/processingFlags";
 
     TestRestTemplate restTemplate = new TestRestTemplate("test", "test");
 
@@ -235,7 +235,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest {
                 "{\r\n\"modelInfo\": {\r\n\"modelName\": \"vSAMP10a\",\r\n\"modelUuid\": \"ff2ae348-214a-11e7-93ae-92361f002671\",\r\n\"modelInvariantUuid\": \"2fff5b20-214b-11e7-93ae-92361f002671\",\r\n\"modelVersion\": \"1.0\",\r\n\"modelCustomizationUuid\": \"68dc9a92-214c-11e7-93ae-92361f002671\",\r\n\"modelInstanceName\": \"vSAMP10a 1\"\r\n},\r\n\"toscaNodeType\": \"VF\",\r\n\"nfFunction\": \"vSAMP\",\r\n\"nfType\": \"vSAMP\",\r\n\"nfRole\": \"vSAMP\",\r\n\"nfNamingCode\": \"vSAMP\",\r\n\"multiStageDesign\": null,\r\n\"vfModules\": [\r\n{\r\n\"modelInfo\": {\r\n\"modelName\": \"vSAMP10aDEV::base::module-0\",\r\n\"modelUuid\": \"20c4431c-246d-11e7-93ae-92361f002671\",\r\n\"modelInvariantUuid\": \"78ca26d0-246d-11e7-93ae-92361f002671\",\r\n\"modelVersion\": \"2\",\r\n\"modelCustomizationUuid\": \"cb82ffd8-252a-11e7-93ae-92361f002671\"\r\n},\r\n\"isBase\": true,\r\n\"vfModuleLabel\": \"base\",\r\n\"initialCount\": 1,\r\n\"hasVolumeGroup\": false\r\n},\r\n{\r\n\"modelInfo\": {\r\n\"modelName\": \"vSAMP10aDEV::PCM::module-1\",\r\n\"modelUuid\": \"066de97e-253e-11e7-93ae-92361f002671\",\r\n\"modelInvariantUuid\": \"64efd51a-2544-11e7-93ae-92361f002671\",\r\n\"modelVersion\": \"2\",\r\n\"modelCustomizationUuid\": \"b4ea86b4-253f-11e7-93ae-92361f002671\"\r\n},\r\n\"isBase\": false,\r\n\"vfModuleLabel\": \"PCM\",\r\n\"initialCount\": 0,\r\n\"hasVolumeGroup\": false\r\n}\r\n]\r\n}";
         UriComponentsBuilder builder = UriComponentsBuilder
                 .fromHttpUrl(
-                        createURLWithPort("ecomp/mso/catalog/v2/vnfResources/68dc9a92-214c-11e7-93ae-92361f002671"))
+                        createURLWithPort("/ecomp/mso/catalog/v2/vnfResources/68dc9a92-214c-11e7-93ae-92361f002671"))
                 .queryParam("filter", "resourceInput");
 
         ResponseEntity<String> response =
@@ -253,7 +253,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest {
         headers.set("Accept", MediaType.APPLICATION_JSON);
 
         UriComponentsBuilder builder = UriComponentsBuilder
-                .fromHttpUrl(createURLWithPort("ecomp/mso/catalog/v2/vnfResources/68dc-11e7-93ae-92361f002671"));
+                .fromHttpUrl(createURLWithPort("/ecomp/mso/catalog/v2/vnfResources/68dc-11e7-93ae-92361f002671"));
 
         ResponseEntity<String> response =
                 restTemplate.exchange(builder.toUriString(), HttpMethod.GET, entity, String.class);
@@ -440,7 +440,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest {
         String expectedResponse =
                 "{\r\n\"modelInfo\": {\r\n\"modelName\": \"CONTRAIL30_GNDIRECT\",\r\n\"modelUuid\": \"10b36f65-f4e6-4be6-ae49-9596dc1c47fc\",\r\n\"modelInvariantUuid\": \"ce4ff476-9641-4e60-b4d5-b4abbec1271d\",\r\n\"modelVersion\": \"1.0\",\r\n\"modelCustomizationUuid\": \"3bdbb104-476c-483e-9f8b-c095b3d308ac\",\r\n\"modelInstanceName\": \"CONTRAIL30_GNDIRECT 9\"\r\n},\r\n\"toscaNodeType\": \"\",\r\n\"networkType\": \"\",\r\n\"networkTechnology\": \"\",\r\n\"networkRole\": \"\",\r\n\"networkScope\": \"\"\r\n}";
         UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(
-                createURLWithPort("ecomp/mso/catalog/v2/networkResources/3bdbb104-476c-483e-9f8b-c095b3d308ac"));
+                createURLWithPort("/ecomp/mso/catalog/v2/networkResources/3bdbb104-476c-483e-9f8b-c095b3d308ac"));
 
         ResponseEntity<String> response =
                 restTemplate.exchange(builder.toUriString(), HttpMethod.GET, entity, String.class);
@@ -457,7 +457,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest {
         headers.set("Accept", MediaType.APPLICATION_JSON);
 
         UriComponentsBuilder builder = UriComponentsBuilder
-                .fromHttpUrl(createURLWithPort("ecomp/mso/catalog/v2/networkResources/3bdbb104-4asdf"));
+                .fromHttpUrl(createURLWithPort("/ecomp/mso/catalog/v2/networkResources/3bdbb104-4asdf"));
 
         ResponseEntity<String> response =
                 restTemplate.exchange(builder.toUriString(), HttpMethod.GET, entity, String.class);
@@ -622,7 +622,7 @@ public class CatalogDBRestTest extends CatalogDbAdapterBaseTest {
                 "{\r\n\"modelInfo\": {\r\n\"modelName\": \"Tunnel_Xconn\",\r\n\"modelUuid\": \"f6b7d4c6-e8a4-46e2-81bc-31cad5072842\",\r\n\"modelInvariantUuid\": \"b7a1b78e-6b6b-4b36-9698-8c9530da14af\",\r\n\"modelVersion\": \"1.0\",\r\n\"modelCustomizationUuid\": \"367a8ba9-057a-4506-b106-fbae818597c6\",\r\n\"modelInstanceName\": \"Sec_Tunnel_Xconn 11\"\r\n},\r\n\"toscaNodeType\": \"\",\r\n\"allottedResourceType\": \"\",\r\n\"allottedResourceRole\": null,\r\n\"providingServiceModelName\": null,\r\n\"providingServiceModelInvariantUuid\": null,\r\n\"providingServiceModelUuid\": null,\r\n\"nfFunction\": null,\r\n\"nfType\": null,\r\n\"nfRole\": null,\r\n\"nfNamingCode\": null\r\n}";
 
         UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(
-                createURLWithPort("ecomp/mso/catalog/v2/allottedResources/367a8ba9-057a-4506-b106-fbae818597c6"));
+                createURLWithPort("/ecomp/mso/catalog/v2/allottedResources/367a8ba9-057a-4506-b106-fbae818597c6"));
 
 
         ResponseEntity<String> response =
index 4170ad0..a8ac673 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -43,20 +43,15 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
-import org.mockito.ArgumentMatchers;
-import org.mockito.Mockito;
 import org.mockito.Spy;
 import org.onap.so.asdc.BaseTest;
 import org.onap.so.asdc.client.test.emulators.DistributionClientEmulator;
 import org.onap.so.asdc.client.test.emulators.NotificationDataImpl;
 import org.onap.so.db.catalog.beans.AllottedResource;
 import org.onap.so.db.catalog.beans.AllottedResourceCustomization;
-import org.onap.so.db.catalog.beans.ConfigurationResourceCustomization;
 import org.onap.so.db.catalog.beans.NetworkResource;
-import org.onap.so.db.catalog.beans.NetworkResourceCustomization;
 import org.onap.so.db.catalog.beans.Service;
 import org.onap.so.db.catalog.beans.ToscaCsar;
-import org.onap.so.db.catalog.beans.VnfResource;
 import org.onap.so.db.catalog.beans.VnfResourceCustomization;
 import org.onap.so.db.catalog.beans.Workflow;
 import org.onap.so.db.catalog.data.repository.AllottedResourceCustomizationRepository;
@@ -65,7 +60,6 @@ import org.onap.so.db.catalog.data.repository.NetworkResourceRepository;
 import org.onap.so.db.catalog.data.repository.ServiceRepository;
 import org.onap.so.db.catalog.data.repository.ToscaCsarRepository;
 import org.onap.so.db.catalog.data.repository.VnfCustomizationRepository;
-import org.onap.so.db.catalog.data.repository.VnfResourceRepository;
 import org.onap.so.db.catalog.data.repository.WorkflowRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.web.client.TestRestTemplate;
@@ -143,7 +137,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
         headers.add("resource-location", "src/test/resources/resource-examples/allottedresource/");
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
 
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
 
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
@@ -195,7 +189,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
         headers.add("resource-location", "src/test/resources/resource-examples/vFW/");
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
 
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
 
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
@@ -239,7 +233,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
         headers.add("resource-location", "src/test/resources/resource-examples/WorkflowBpmn/");
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
 
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
 
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
@@ -289,7 +283,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
         headers.add("resource-location", resourceLocation);
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
 
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
 
@@ -333,7 +327,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
                 NotificationDataImpl.class);
         headers.add("resource-location", resourceLocation);
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
 
@@ -360,13 +354,13 @@ public class ASDCRestInterfaceTest extends BaseTest {
 
         request = mapper.readValue(new File(resourceLocation + "nsst-notification.json"), NotificationDataImpl.class);
         entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"), HttpMethod.POST, entity,
+        response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"), HttpMethod.POST, entity,
                 String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
 
         request = mapper.readValue(new File(resourceLocation + "nst-notification.json"), NotificationDataImpl.class);
         entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"), HttpMethod.POST, entity,
+        response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"), HttpMethod.POST, entity,
                 String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
 
@@ -394,7 +388,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
                 NotificationDataImpl.class);
         headers.add("resource-location", resourceLocation);
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
 
@@ -418,7 +412,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
                 new File(resourceLocation + "demo-vcpe-rescust-notification.json"), NotificationDataImpl.class);
         headers.add("resource-location", resourceLocation);
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
 
@@ -440,7 +434,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
                 new File(resourceLocation + "service-ubuntu16test-notification.json"), NotificationDataImpl.class);
         headers.add("resource-location", resourceLocation);
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
         Optional<Service> service = serviceRepo.findById("ed0391da-b963-4c45-bf3a-b49cc7a94fab");
@@ -462,7 +456,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
                 new File(resourceLocation + "service-BasicCnf-notification.json"), NotificationDataImpl.class);
         headers.add("resource-location", resourceLocation);
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
         Optional<Service> service = serviceRepo.findById("31e0cd50-0a84-42b4-a7a8-dd5d82e6907d");
@@ -483,7 +477,7 @@ public class ASDCRestInterfaceTest extends BaseTest {
                 new File(resourceLocation + "service-BasicNetwork-notification.json"), NotificationDataImpl.class);
         headers.add("resource-location", resourceLocation);
         HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
-        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+        ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("/test/treatNotification/v1"),
                 HttpMethod.POST, entity, String.class);
         assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
         Optional<Service> service = serviceRepo.findById("9ff42123-ff24-41dc-9f41-a956c9328699");
index 9c3875d..d49e8ab 100644 (file)
     <dependency>
       <groupId>io.grpc</groupId>
       <artifactId>grpc-testing</artifactId>
+      <version>${grpc.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
index c955437..4622cc7 100644 (file)
     <dependency>
       <groupId>io.grpc</groupId>
       <artifactId>grpc-protobuf</artifactId>
+      <version>${grpc.version}</version>
       <exclusions>
         <exclusion>
           <groupId>com.google.code.findbugs</groupId>
     <dependency>
       <groupId>io.grpc</groupId>
       <artifactId>grpc-netty</artifactId>
+      <version>${grpc.version}</version>
     </dependency>
     <dependency>
       <groupId>io.grpc</groupId>
       <artifactId>grpc-testing</artifactId>
+      <version>${grpc.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <plugins>
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.20</version>
+          <version>3.1.2</version>
           <configuration>
             <systemPropertyVariables>
               <so.log.level>DEBUG</so.log.level>
index da01e5e..70feb56 100644 (file)
@@ -5,15 +5,15 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * 
+ *
  * SPDX-License-Identifier: Apache-2.0
  * ============LICENSE_END=========================================================
  */
@@ -27,8 +27,8 @@ import java.util.function.Function;
 import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import org.springframework.web.servlet.HandlerInterceptor;
 import org.springframework.web.servlet.ModelAndView;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
 import com.google.common.collect.ImmutableSet;
 
 /**
@@ -36,7 +36,7 @@ import com.google.common.collect.ImmutableSet;
  *
  */
 
-public class HttpHeaderForwarderHandlerInterceptor extends HandlerInterceptorAdapter {
+public class HttpHeaderForwarderHandlerInterceptor implements HandlerInterceptor {
 
     private static final ThreadLocal<Map<String, List<String>>> HEADERS_THREAD_LOCAL = new ThreadLocal<>();
 
@@ -52,7 +52,7 @@ public class HttpHeaderForwarderHandlerInterceptor extends HandlerInterceptorAda
                 .collect(Collectors.toMap(Function.identity(), h -> Collections.list(request.getHeaders(h))));
 
         HEADERS_THREAD_LOCAL.set(headerMap);
-        return super.preHandle(request, response, handler);
+        return true;
     }
 
     @Override
diff --git a/common/src/main/java/org/onap/so/spring/GracefulShutdown.java b/common/src/main/java/org/onap/so/spring/GracefulShutdown.java
deleted file mode 100644 (file)
index 60f5b07..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.onap.so.spring;
-
-import java.util.concurrent.Executor;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import org.apache.catalina.connector.Connector;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
-import org.springframework.context.event.ContextClosedEvent;
-import org.springframework.context.event.EventListener;
-
-public class GracefulShutdown implements TomcatConnectorCustomizer {
-
-    private static final Logger logger = LoggerFactory.getLogger(GracefulShutdown.class);
-
-    private volatile Connector connector;
-
-    @Override
-    public void customize(Connector connector) {
-        this.connector = connector;
-    }
-
-    @EventListener
-    public void handleClosedEvent(ContextClosedEvent event) {
-        this.connector.pause();
-        Executor executor = this.connector.getProtocolHandler().getExecutor();
-        if (executor instanceof ThreadPoolExecutor) {
-            try {
-                ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executor;
-                threadPoolExecutor.shutdown();
-                if (!threadPoolExecutor.awaitTermination(30, TimeUnit.SECONDS)) {
-                    logger.warn("Tomcat thread pool did not shut down gracefully within "
-                            + "30 seconds. Proceeding with forceful shutdown");
-                }
-            } catch (InterruptedException ex) {
-                Thread.currentThread().interrupt();
-            }
-        }
-    }
-}
diff --git a/common/src/main/java/org/onap/so/spring/GracefulShutdownBeans.java b/common/src/main/java/org/onap/so/spring/GracefulShutdownBeans.java
deleted file mode 100644 (file)
index 219c82f..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.onap.so.spring;
-
-import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
-import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
-import org.springframework.context.annotation.Bean;
-
-public class GracefulShutdownBeans {
-
-    @Bean
-    public GracefulShutdown gracefulShutdown() {
-        return new GracefulShutdown();
-    }
-
-    @Bean
-    public ConfigurableServletWebServerFactory webServerFactory(final GracefulShutdown gracefulShutdown) {
-        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
-        factory.addConnectorCustomizers(gracefulShutdown);
-        return factory;
-    }
-}
index 77d6f68..14d03f6 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -51,7 +51,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class TasksHandlerTest extends BaseTest {
 
-    private final String basePath = "onap/so/infra/tasks/v1";
+    private final String basePath = "/onap/so/infra/tasks/v1";
 
     @Test
     public void getTasksTestByOriginalRequestId()
index 1fa71ce..29b75ac 100644 (file)
@@ -64,7 +64,7 @@ public class WorkflowSpecificationsHandlerTest extends BaseTest {
     @Value("${wiremock.server.port}")
     private String wiremockPort;
 
-    private final String basePath = "onap/so/infra/workflowSpecifications";
+    private final String basePath = "/onap/so/infra/workflowSpecifications";
 
     @Test
     public void queryWorkflowSpecificationsByVnfModelUUID_Test_Success()
diff --git a/pom.xml b/pom.xml
index 3bf10c0..93fde1a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -66,8 +66,8 @@
     <siteNexusPath>content/sites/site/org/onap/so/${project.version}/</siteNexusPath>
     <cxf.version>3.4.1</cxf.version>
     <jax.ws.rs>2.1</jax.ws.rs>
-    <springboot.version>2.3.12.RELEASE</springboot.version>
-    <spring-cloud.version>Hoxton.SR12</spring-cloud.version>
+    <springboot.version>2.4.13</springboot.version>
+    <spring-cloud.version>2020.0.6</spring-cloud.version>
     <format.skipValidate>false</format.skipValidate>
     <format.skipExecute>true</format.skipExecute>
     <io.fabric8.version>0.33.0</io.fabric8.version>
@@ -76,6 +76,7 @@
     <so-etsi-sol003-adapter-version>1.9.0-SNAPSHOT</so-etsi-sol003-adapter-version>
     <onap-logging-version>1.6.9</onap-logging-version>
     <jackson.version>2.14.3</jackson.version>
+    <grpc.version>1.25.0</grpc.version>
   </properties>
   <distributionManagement>
     <repository>
         <artifactId>shedlock-provider-jdbc-template</artifactId>
         <version>4.0.0</version>
       </dependency>
-      <dependency>
-        <groupId>org.flywaydb</groupId>
-        <artifactId>flyway-core</artifactId>
-        <version>6.5.7</version>
-      </dependency>
       <dependency>
         <groupId>org.json</groupId>
         <artifactId>json</artifactId>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
+      <dependency>
+        <groupId>io.grpc</groupId>
+        <artifactId>grpc-bom</artifactId>
+        <version>${grpc.version}</version>
+        <type>pom</type>
+      </dependency>
     </dependencies>
   </dependencyManagement>
   <profiles>