Upgrade spring-boot to 2.7.X in model-loader 01/137801/1 master
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Fri, 26 Apr 2024 15:15:29 +0000 (17:15 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Fri, 26 Apr 2024 15:15:29 +0000 (17:15 +0200)
- upgrade spring-boot from 2.4.13 to 2.7.18

Issue-ID: AAI-3838
Change-Id: Ia43df48e049ae1e3d05aaa0ed85c245db7df004c
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
pom.xml
src/main/java/org/onap/aai/modelloader/service/ModelController.java

diff --git a/pom.xml b/pom.xml
index 2ac1b3f..fb4aad4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
                <nexusproxy>https://nexus.onap.org</nexusproxy>
                <docker.location>${basedir}/target</docker.location>
                <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
                <nexusproxy>https://nexus.onap.org</nexusproxy>
                <docker.location>${basedir}/target</docker.location>
-               <spring-boot.version>2.4.13</spring-boot.version>
-               <spring-cloud.version>2020.0.2</spring-cloud.version>
+               <spring-boot.version>2.7.18</spring-boot.version>
+               <spring-cloud.version>2021.0.8</spring-cloud.version>
                <apache.commons-text.version>1.10.0</apache.commons-text.version>
                <commons-compress.version>1.22</commons-compress.version>
                <gson.version>2.10.1</gson.version>
                <hamcrest-all.version>1.3</hamcrest-all.version>
                <babel.version>1.13.0</babel.version>
                <apache.commons-text.version>1.10.0</apache.commons-text.version>
                <commons-compress.version>1.22</commons-compress.version>
                <gson.version>2.10.1</gson.version>
                <hamcrest-all.version>1.3</hamcrest-all.version>
                <babel.version>1.13.0</babel.version>
-               <aai.rest.client.version>1.2.1</aai.rest.client.version>
                <sdc-distribution-client.version>2.1.1</sdc-distribution-client.version>
                <logback.version>1.2.11</logback.version>
                <!-- docker related properties -->
                <sdc-distribution-client.version>2.1.1</sdc-distribution-client.version>
                <logback.version>1.2.11</logback.version>
                <!-- docker related properties -->
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
-                               <version>3.0.0-M4</version>
+                               <version>3.1.2</version>
                                <configuration>
                                        <!-- Sets the VM argument line used when unit tests are run. -->
                                        <argLine>${surefireArgLine}</argLine>
                                <configuration>
                                        <!-- Sets the VM argument line used when unit tests are run. -->
                                        <argLine>${surefireArgLine}</argLine>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-failsafe-plugin</artifactId>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-failsafe-plugin</artifactId>
-                               <version>3.0.0-M4</version>
+                               <version>3.1.2</version>
                                <executions>
                                        <!-- Ensures that both integration-test and verify goals of the Failsafe
                      Maven plugin are executed. -->
                                <executions>
                                        <!-- Ensures that both integration-test and verify goals of the Failsafe
                      Maven plugin are executed. -->
index 343fdca..4e883aa 100644 (file)
@@ -34,6 +34,7 @@ import org.onap.aai.modelloader.notification.NotificationDataImpl;
 import org.onap.aai.modelloader.notification.NotificationPublisher;
 import org.onap.sdc.api.IDistributionClient;
 import org.onap.sdc.api.notification.IArtifactInfo;
 import org.onap.aai.modelloader.notification.NotificationPublisher;
 import org.onap.sdc.api.IDistributionClient;
 import org.onap.sdc.api.notification.IArtifactInfo;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -83,7 +84,7 @@ public class ModelController {
             response = processTestArtifact(modelName, modelVersion, payload);
         } else {
             logger.debug("Simulation interface disabled");
             response = processTestArtifact(modelName, modelVersion, payload);
         } else {
             logger.debug("Simulation interface disabled");
-            response = ResponseEntity.internalServerError().build();
+            response = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
         }
 
         return response;
         }
 
         return response;
@@ -116,7 +117,7 @@ public class ModelController {
             boolean success =
                     artifactDeploymentManager.deploy(notificationData, modelArtifacts, catalogArtifacts);
             logger.info(ModelLoaderMsgs.DISTRIBUTION_EVENT, "Deployment success was " + success);
             boolean success =
                     artifactDeploymentManager.deploy(notificationData, modelArtifacts, catalogArtifacts);
             logger.info(ModelLoaderMsgs.DISTRIBUTION_EVENT, "Deployment success was " + success);
-            response = success ? ResponseEntity.ok().build() : ResponseEntity.internalServerError().build();
+            response = success ? ResponseEntity.ok().build() : ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build();
         } catch (Exception e) {
             String responseMessage = e.getMessage();
             logger.info(ModelLoaderMsgs.DISTRIBUTION_EVENT, "Exception handled: " + responseMessage);
         } catch (Exception e) {
             String responseMessage = e.getMessage();
             logger.info(ModelLoaderMsgs.DISTRIBUTION_EVENT, "Exception handled: " + responseMessage);
@@ -126,7 +127,7 @@ public class ModelController {
             } else {
                 responseMessage += "\nSDC publishing is enabled but has been bypassed";
             }
             } else {
                 responseMessage += "\nSDC publishing is enabled but has been bypassed";
             }
-            response = ResponseEntity.internalServerError().body(responseMessage);
+            response = ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(responseMessage);
         }
         return response;
     }
         }
         return response;
     }