Upgrade sparky-be to spring-boot 2 71/140871/2
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Tue, 13 May 2025 10:27:44 +0000 (12:27 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Wed, 14 May 2025 19:24:08 +0000 (21:24 +0200)
Issue-ID: AAI-4158
Change-Id: Ia4ac6594a6f83c4c6c824c0f10c3c0830a0c6e8e
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
sparkybe-onap-application/pom.xml
sparkybe-onap-application/src/main/java/org/onap/aai/sparky/ProxyHelper.java
sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java
sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyPasswordConfiguration.java
sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java
sparkybe-onap-service/pom.xml

index f22bfb6..4a9ef74 100644 (file)
         <serverPort>9517</serverPort>
         <sslport>8000</sslport>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
-        <camel-spring-boot.version>2.21.1</camel-spring-boot.version>
+        <camel-spring-boot.version>2.22.5</camel-spring-boot.version>
         <config-home>${basedir}/</config-home>
         <version.aai-schema>1.6.6</version.aai-schema>
         <sitePath>/content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version}</sitePath>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
-        <spring.boot.version>1.5.21.RELEASE</spring.boot.version>
+        <spring.boot.version>2.0.9.RELEASE</spring.boot.version>
         <shemaUnpackVersion>onap</shemaUnpackVersion>
         <!-- docker related properties -->
         <docker.image.name>sparky-be</docker.image.name>
                 <scope>import</scope>
             </dependency>
 
-            <dependency>
-                <groupId>ch.qos.logback</groupId>
-                <artifactId>logback-classic</artifactId>
-                <version>1.2.3</version>
-            </dependency>
-
         </dependencies>
 
     </dependencyManagement>
         <dependency>
             <groupId>org.json</groupId>
             <artifactId>json</artifactId>
-            <scope>provided</scope>
+            <version>20250107</version>
         </dependency>
 
         <dependency>
index d6fce44..803c4f0 100644 (file)
@@ -29,8 +29,9 @@ import org.onap.aai.sparky.exception.GenericServiceException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Profile;
 import org.springframework.core.env.Environment;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.servlet.http.HttpServletRequest;
@@ -72,7 +73,7 @@ public class ProxyHelper {
      * @return the response
      */
 
-    @RequestMapping(value = "/proxy/**", method = {RequestMethod.POST})
+    @PostMapping("/proxy/**")
     public String postProxy(HttpServletRequest request,  HttpServletResponse response){
         OperationResult or = null;
         String results = "";
@@ -94,7 +95,7 @@ public class ProxyHelper {
      * @throws Exception
      */
 
-    @RequestMapping(value = "/proxy/**", method = {RequestMethod.PUT})
+    @PutMapping("/proxy/**")
     public String putProxy(HttpServletRequest request,  HttpServletResponse response){
         OperationResult or = null;
         String results = "";
@@ -115,7 +116,7 @@ public class ProxyHelper {
      * @return the response
      */
 
-    @RequestMapping(value = "/proxy/**", method = {RequestMethod.GET})
+    @GetMapping("/proxy/**")
     public String getProxy(HttpServletRequest request,  HttpServletResponse response){
         OperationResult or = null;
         String results = "";
@@ -136,7 +137,7 @@ public class ProxyHelper {
      * @return the response
      */
 
-    @RequestMapping(value = "/aai/v*/bulk/single-transaction", method = {RequestMethod.POST})
+    @PostMapping("/aai/v*/bulk/single-transaction")
     public String bulkSingleTransaction(HttpServletRequest request,  HttpServletResponse response){
         String uid = "testuid";
         if(this.isPortalEnabled()) {
index ab74074..e4321f5 100644 (file)
@@ -20,8 +20,7 @@
  */
 package org.onap.aai.sparky.aai;
 
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -34,7 +33,7 @@ public class FrontEndLayoutApi {
   public FrontEndLayoutApi() {
   }
 
-  @RequestMapping(value = "/layouts", method = {RequestMethod.GET})
+  @GetMapping("/layouts")
   @ResponseBody
   public String getLayouts() {
 
index 3ba9f1d..e988d2b 100644 (file)
@@ -23,7 +23,7 @@ package org.onap.aai.sparky.config;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.eclipse.jetty.util.security.Password;
 import org.springframework.context.ApplicationContextInitializer;
 import org.springframework.context.ConfigurableApplicationContext;
index 7c325b3..8122928 100644 (file)
@@ -72,7 +72,7 @@ public class AggregateSummaryProcessorTest {
   @Value("${schema.ingest.file}") String schemaIngestFileLocation;
 
   @Test
-  public void someTest() throws RestClientException, JsonProcessingException {
+  public void thatFilterAggregationWorks() throws RestClientException, JsonProcessingException {
     when(searchServiceAdapter.doPost(Mockito.any(), Mockito.any())).thenReturn(operationResult);
     when(operationResult.wasSuccessful()).thenReturn(true);
 
index 4453ae9..41d84f4 100644 (file)
                <serverPort>9517</serverPort>
                <sslport>8000</sslport>
                <nexusproxy>https://nexus.onap.org</nexusproxy>
-               <camel-spring-boot.version>2.21.1</camel-spring-boot.version>
+               <camel-spring-boot.version>2.22.5</camel-spring-boot.version>
                <config-home>${basedir}/</config-home>
                <version.aai.aai-schema-ingest>1.4.1</version.aai.aai-schema-ingest>
                <version.aai-schema>1.12.5</version.aai-schema>
                <sitePath>/content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version}</sitePath>
                <onap.nexus.url>https://neexus.onap.org</onap.nexus.url>
                <jacoco.line.coverage.limit>0.53</jacoco.line.coverage.limit>
-               <spring.boot.version>1.5.22.RELEASE</spring.boot.version>
+               <spring.boot.version>2.0.9.RELEASE</spring.boot.version>
        </properties>
 
        <dependencyManagement>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>
-
-                       <dependency>
-                               <groupId>ch.qos.logback</groupId>
-                               <artifactId>logback-classic</artifactId>
-                               <version>1.2.3</version>
-                       </dependency>
                </dependencies>
        </dependencyManagement>
 
@@ -263,7 +257,7 @@ some of the depedencies should probably have a scope of provided so they don't a
                <dependency>
                        <groupId>org.json</groupId>
                        <artifactId>json</artifactId>
-                       <scope>provided</scope>
+                       <version>20250107</version>
                </dependency>
 
                <dependency>