From: Fiete Ostkamp Date: Fri, 30 May 2025 13:50:51 +0000 (+0000) Subject: Revert "Upgrade sparky-be to spring-boot 2" X-Git-Tag: 2.1.0~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=9ab83c134fbf478bbcbc519a523d3cde50d040c4;p=aai%2Fsparky-be.git Revert "Upgrade sparky-be to spring-boot 2" This reverts commit 7f7b460a6619712619df5a21c793bf3a63d7c907. Reason for revert: Proxying to frontend war is not working Issue-ID: AAI-4158 Change-Id: Ib01b3fcf0b794f0ce4e2f089969db6c9ef36f1b3 Signed-off-by: Fiete Ostkamp --- diff --git a/sparkybe-onap-application/pom.xml b/sparkybe-onap-application/pom.xml index 4a9ef74..f22bfb6 100644 --- a/sparkybe-onap-application/pom.xml +++ b/sparkybe-onap-application/pom.xml @@ -21,12 +21,12 @@ 9517 8000 https://nexus.onap.org - 2.22.5 + 2.21.1 ${basedir}/ 1.6.6 /content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version} https://nexus.onap.org - 2.0.9.RELEASE + 1.5.21.RELEASE onap sparky-be @@ -58,6 +58,12 @@ import + + ch.qos.logback + logback-classic + 1.2.3 + + @@ -253,7 +259,7 @@ org.json json - 20250107 + provided 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 803c4f0..d6fce44 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,9 +29,8 @@ 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.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; @@ -73,7 +72,7 @@ public class ProxyHelper { * @return the response */ - @PostMapping("/proxy/**") + @RequestMapping(value = "/proxy/**", method = {RequestMethod.POST}) public String postProxy(HttpServletRequest request, HttpServletResponse response){ OperationResult or = null; String results = ""; @@ -95,7 +94,7 @@ public class ProxyHelper { * @throws Exception */ - @PutMapping("/proxy/**") + @RequestMapping(value = "/proxy/**", method = {RequestMethod.PUT}) public String putProxy(HttpServletRequest request, HttpServletResponse response){ OperationResult or = null; String results = ""; @@ -116,7 +115,7 @@ public class ProxyHelper { * @return the response */ - @GetMapping("/proxy/**") + @RequestMapping(value = "/proxy/**", method = {RequestMethod.GET}) public String getProxy(HttpServletRequest request, HttpServletResponse response){ OperationResult or = null; String results = ""; @@ -137,7 +136,7 @@ public class ProxyHelper { * @return the response */ - @PostMapping("/aai/v*/bulk/single-transaction") + @RequestMapping(value = "/aai/v*/bulk/single-transaction", method = {RequestMethod.POST}) 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 e4321f5..ab74074 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,7 +20,8 @@ */ package org.onap.aai.sparky.aai; -import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; @@ -33,7 +34,7 @@ public class FrontEndLayoutApi { public FrontEndLayoutApi() { } - @GetMapping("/layouts") + @RequestMapping(value = "/layouts", method = {RequestMethod.GET}) @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 e988d2b..3ba9f1d 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.lang3.StringUtils; +import org.apache.commons.lang.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 8122928..7c325b3 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 thatFilterAggregationWorks() throws RestClientException, JsonProcessingException { + public void someTest() 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 41d84f4..4453ae9 100644 --- a/sparkybe-onap-service/pom.xml +++ b/sparkybe-onap-service/pom.xml @@ -20,14 +20,14 @@ 9517 8000 https://nexus.onap.org - 2.22.5 + 2.21.1 ${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 - 2.0.9.RELEASE + 1.5.22.RELEASE @@ -47,6 +47,12 @@ pom import + + + ch.qos.logback + logback-classic + 1.2.3 + @@ -257,7 +263,7 @@ some of the depedencies should probably have a scope of provided so they don't a org.json json - 20250107 + provided