Revert "Upgrade sparky-be to spring-boot 2" 73/141073/1
authorFiete Ostkamp <fiete.ostkamp@telekom.de>
Fri, 30 May 2025 13:50:51 +0000 (13:50 +0000)
committerFiete Ostkamp <fiete.ostkamp@telekom.de>
Fri, 30 May 2025 13:50:51 +0000 (13:50 +0000)
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 <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 4a9ef74..f22bfb6 100644 (file)
         <serverPort>9517</serverPort>
         <sslport>8000</sslport>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
-        <camel-spring-boot.version>2.22.5</camel-spring-boot.version>
+        <camel-spring-boot.version>2.21.1</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>2.0.9.RELEASE</spring.boot.version>
+        <spring.boot.version>1.5.21.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>
-            <version>20250107</version>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>
index 803c4f0..d6fce44 100644 (file)
@@ -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()) {
index e4321f5..ab74074 100644 (file)
@@ -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() {
 
index e988d2b..3ba9f1d 100644 (file)
@@ -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;
index 8122928..7c325b3 100644 (file)
@@ -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);
 
index 41d84f4..4453ae9 100644 (file)
                <serverPort>9517</serverPort>
                <sslport>8000</sslport>
                <nexusproxy>https://nexus.onap.org</nexusproxy>
-               <camel-spring-boot.version>2.22.5</camel-spring-boot.version>
+               <camel-spring-boot.version>2.21.1</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>2.0.9.RELEASE</spring.boot.version>
+               <spring.boot.version>1.5.22.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>
 
@@ -257,7 +263,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>
-                       <version>20250107</version>
+                       <scope>provided</scope>
                </dependency>
 
                <dependency>