From: Fiete Ostkamp Date: Tue, 13 May 2025 10:27:44 +0000 (+0200) Subject: Upgrade sparky-be to spring-boot 2 X-Git-Tag: 2.1.0~3 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=7f7b460a6619712619df5a21c793bf3a63d7c907;p=aai%2Fsparky-be.git Upgrade sparky-be to spring-boot 2 Issue-ID: AAI-4158 Change-Id: Ia4ac6594a6f83c4c6c824c0f10c3c0830a0c6e8e Signed-off-by: Fiete Ostkamp --- diff --git a/sparkybe-onap-application/pom.xml b/sparkybe-onap-application/pom.xml index f22bfb6..4a9ef74 100644 --- a/sparkybe-onap-application/pom.xml +++ b/sparkybe-onap-application/pom.xml @@ -21,12 +21,12 @@ 9517 8000 https://nexus.onap.org - 2.21.1 + 2.22.5 ${basedir}/ 1.6.6 /content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version} https://nexus.onap.org - 1.5.21.RELEASE + 2.0.9.RELEASE onap sparky-be @@ -58,12 +58,6 @@ import - - ch.qos.logback - logback-classic - 1.2.3 - - @@ -259,7 +253,7 @@ org.json json - provided + 20250107 diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/ProxyHelper.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/ProxyHelper.java index d6fce44..803c4f0 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/ProxyHelper.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/ProxyHelper.java @@ -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()) { diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java index ab74074..e4321f5 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/aai/FrontEndLayoutApi.java @@ -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() { diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyPasswordConfiguration.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyPasswordConfiguration.java index 3ba9f1d..e988d2b 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyPasswordConfiguration.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/config/PropertyPasswordConfiguration.java @@ -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; diff --git a/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java b/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java index 7c325b3..8122928 100644 --- a/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java +++ b/sparkybe-onap-application/src/test/java/org/onap/aai/sparky/aggregatevnf/AggregateSummaryProcessorTest.java @@ -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); diff --git a/sparkybe-onap-service/pom.xml b/sparkybe-onap-service/pom.xml index 4453ae9..41d84f4 100644 --- a/sparkybe-onap-service/pom.xml +++ b/sparkybe-onap-service/pom.xml @@ -20,14 +20,14 @@ 9517 8000 https://nexus.onap.org - 2.21.1 + 2.22.5 ${basedir}/ 1.4.1 1.12.5 /content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version} https://neexus.onap.org 0.53 - 1.5.22.RELEASE + 2.0.9.RELEASE @@ -47,12 +47,6 @@ pom import - - - ch.qos.logback - logback-classic - 1.2.3 - @@ -263,7 +257,7 @@ some of the depedencies should probably have a scope of provided so they don't a org.json json - provided + 20250107