Upgrade Spring Boot from 1.5.x to 2.1.6 97/92297/1
authorLee, Tian (tl5884) <TianL@amdocs.com>
Tue, 30 Jul 2019 15:45:43 +0000 (16:45 +0100)
committerLee, Tian (tl5884) <TianL@amdocs.com>
Tue, 30 Jul 2019 15:58:50 +0000 (16:58 +0100)
Changes required to upgrade Babel to latest Spring Boot version.

This changelist is dependent on https://gerrit.onap.org/r/c/aai/oom/+/92293

Issue-ID: AAI-2540
Change-Id: I804b80506514d274249fa4eae36392793cb737fb
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
pom.xml
src/main/java/org/onap/aai/auth/AAIMicroServiceAuthCore.java
src/main/java/org/onap/aai/babel/BabelApplication.java
src/main/resources/application.properties

diff --git a/pom.xml b/pom.xml
index 65a963d..2c762b2 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,8 @@
     ============LICENSE_END=========================================================
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
 
@@ -42,7 +43,7 @@
 
        <properties>
                <!-- Spring boot version -->
-               <spring.boot.version>1.5.19.RELEASE</spring.boot.version>
+               <spring.boot.version>2.1.6.RELEASE</spring.boot.version>
 
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
                <dependency>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-jersey</artifactId>
-                       <exclusions>
-                         <exclusion>
-                           <groupId>org.springframework.boot</groupId>
-                           <artifactId>spring-boot-starter-tomcat</artifactId>
-                         </exclusion>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.springframework.boot</groupId>
+                                       <artifactId>spring-boot-starter-tomcat</artifactId>
+                               </exclusion>
                        </exclusions>
                </dependency>
                <dependency>
                <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-lang3</artifactId>
-                       <version>${apache.lang3.version}</version>
                </dependency>
                <dependency>
                        <groupId>javax.ws.rs</groupId>
                </dependency>
                <dependency>
                        <groupId>org.codehaus.groovy</groupId>
-                       <artifactId>groovy-all</artifactId>
+                       <artifactId>groovy</artifactId>
                </dependency>
                <dependency>
                        <groupId>org.onap.sdc.sdc-tosca</groupId>
                                        <jvmArguments>
                                                -DCONFIG_HOME=./appconfig-local
                                                -DAPP_HOME=.
-                                                -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json
+                                               -Dtosca.mappings.config=./appconfig-local/tosca-mappings.json
                                                -DKEY_STORE_PASSWORD=${KEY_STORE_PASSWORD}
                                        </jvmArguments>
                                </configuration>
index eae1a24..f1b3549 100644 (file)
@@ -165,7 +165,7 @@ public class AAIMicroServiceAuthCore {
             }
         } catch (FileNotFoundException e) {
             throw new AAIAuthException("Auth policy file could not be found", e);
-        } catch (JsonProcessingException e) {
+        } catch (JsonProcessingException | NullPointerException e) {
             throw new AAIAuthException("Error processing Auth policy file ", e);
         } catch (IOException e) {
             throw new AAIAuthException("Error reading Auth policy file", e);
index e524e6e..b3eaee4 100644 (file)
@@ -26,7 +26,7 @@ import org.eclipse.jetty.util.security.Password;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.support.SpringBootServletInitializer;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
 import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.context.annotation.ImportResource;
 
index 187826a..9a7d699 100644 (file)
@@ -2,7 +2,7 @@ server.port=9516
 server.ssl.key-store=${CONFIG_HOME}/auth/tomcat_keystore
 server.ssl.client-auth=need
 
-server.contextPath=/services/babel-service
+server.servlet.context-path=/services/babel-service
 
 logging.config=${CONFIG_HOME}/logback.xml