aboutsummaryrefslogtreecommitdiffstats
path: root/ms/sliboot
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2021-08-17 09:09:41 -0400
committerDan Timoney <dtimoney@att.com>2021-08-17 09:09:41 -0400
commitd411412b88a1eccd593a9227c1659a52e167b861 (patch)
treebd4a13a1e3333efe478d44befd6e45a9bd63995e /ms/sliboot
parentd2678073e6b4101c1f68eef22011734526ebcc25 (diff)
Upgrade to springboot 2.5
Upgrade to springboot version 2.5 to address third party vulnerabilities Issue-ID: CCSDK-3415 Signed-off-by: Dan Timoney <dtimoney@att.com> Change-Id: Id7d3d3ab9bf161600412b33862526181f2444224
Diffstat (limited to 'ms/sliboot')
-rw-r--r--ms/sliboot/pom.xml18
-rwxr-xr-xms/sliboot/src/main/dc/docker-compose.yaml17
-rw-r--r--ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java2
-rw-r--r--ms/sliboot/src/main/resources/application.properties4
-rw-r--r--ms/sliboot/src/main/resources/dblib.properties10
-rw-r--r--ms/sliboot/src/main/resources/svclogic.properties8
6 files changed, 31 insertions, 28 deletions
diff --git a/ms/sliboot/pom.xml b/ms/sliboot/pom.xml
index e93f70a3..a9ffec0b 100644
--- a/ms/sliboot/pom.xml
+++ b/ms/sliboot/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
+ <artifactId>spring-boot-25-starter-parent</artifactId>
<version>2.2.0-SNAPSHOT</version>
<relativePath/>
</parent>
@@ -68,13 +68,8 @@
</dependency>
<dependency>
<groupId>io.springfox</groupId>
- <artifactId>springfox-swagger2</artifactId>
- <version>2.9.2</version>
- </dependency>
- <dependency>
- <groupId>io.springfox</groupId>
- <artifactId>springfox-swagger-ui</artifactId>
- <version>2.9.2</version>
+ <artifactId>springfox-boot-starter</artifactId>
+ <version>${springfox.version}</version>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
@@ -97,6 +92,12 @@
<artifactId>aaf-misc-env</artifactId>
<version>${aaf.cadi.version}</version>
<scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
@@ -514,6 +515,7 @@
<MYSQL_USER>sli</MYSQL_USER>
<MYSQL_PASSWORD>abc123</MYSQL_PASSWORD>
<MYSQL_DATABASE>sdnctl</MYSQL_DATABASE>
+ <MYSQL_HOST>dbhost</MYSQL_HOST>
<SDNC_CONFIG_DIR>/opt/onap/ccsdk/config</SDNC_CONFIG_DIR>
</env>
<dependsOn>
diff --git a/ms/sliboot/src/main/dc/docker-compose.yaml b/ms/sliboot/src/main/dc/docker-compose.yaml
index 31d06802..7b85745a 100755
--- a/ms/sliboot/src/main/dc/docker-compose.yaml
+++ b/ms/sliboot/src/main/dc/docker-compose.yaml
@@ -7,11 +7,11 @@ services:
ports:
- "13306:3306"
environment:
- - MYSQL_ROOT_PASSWORD=openECOMP1.0
+ - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_ROOT_HOST=%
- - MYSQL_USER=sli
- - MYSQL_PASSWORD=abc123
- - MYSQL_DATABASE=sdnctl
+ - MYSQL_USER=${MYSQL_USER}
+ - MYSQL_PASSWORD=${MYSQL_PASSWORD}
+ - MYSQL_DATABASE=${MYSQL_DATABASE}
logging:
driver: "json-file"
options:
@@ -30,10 +30,11 @@ services:
links:
- db:dbhost
environment:
- - MYSQL_DB_HOST=dbhost
- - MYSQL_DB_USER=sli
- - MYSQL_DB_PASSWD=abc123
- - MYSQL_DB_DATABASE=sdnctl
+ - MYSQL_HOST=dbhost
+ - MYSQL_USER=${MYSQL_USER}
+ - MYSQL_PASSWORD=${MYSQL_PASSWORD}
+ - MYSQL_DATABASE=${MYSQL_DATABASE}
+ - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- SDNC_CONFIG_DIR=/opt/onap/ccsdk/config
logging:
driver: "json-file"
diff --git a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java
index 36048ea4..beab2569 100644
--- a/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java
+++ b/ms/sliboot/src/main/java/org/onap/ccsdk/apps/ms/sliboot/SlibootApp.java
@@ -41,7 +41,7 @@ import org.onap.aaf.cadi.filter.CadiFilter;
@EnableJpaRepositories("org.onap.ccsdk.apps.ms.sliboot.*")
@EntityScan("org.onap.ccsdk.apps.ms.sliboot.*")
@EnableTransactionManagement
-@EnableSwagger2
+// @EnableSwagger2
public class SlibootApp {
private static final Logger log = LoggerFactory.getLogger(SlibootApp.class);
diff --git a/ms/sliboot/src/main/resources/application.properties b/ms/sliboot/src/main/resources/application.properties
index 6d8b6664..d98aac30 100644
--- a/ms/sliboot/src/main/resources/application.properties
+++ b/ms/sliboot/src/main/resources/application.properties
@@ -14,7 +14,7 @@ spring.jackson.date-format=org.onap.ccsdk.apps.ms.sliboot.swagger.RFC3339DateFor
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
logging.level.com.att=TRACE
logging.level.org.onap=TRACE
-spring.datasource.url=jdbc:mariadb://${MYSQL_DB_HOST}:3306/sdnctl
+spring.datasource.url=jdbc:mariadb://${MYSQL_DB_HOST}:3306/${MYSQL_DATABASE}
spring.datasource.username=${MYSQL_USER}
spring.datasource.password=${MYSQL_PASSWORD}
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
@@ -24,4 +24,4 @@ spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
-spring.jpa.database=mysql \ No newline at end of file
+spring.jpa.database=mysql
diff --git a/ms/sliboot/src/main/resources/dblib.properties b/ms/sliboot/src/main/resources/dblib.properties
index b9d98068..b166390b 100644
--- a/ms/sliboot/src/main/resources/dblib.properties
+++ b/ms/sliboot/src/main/resources/dblib.properties
@@ -22,12 +22,12 @@
# dblib.properrties
org.onap.ccsdk.sli.dbtype=jdbc
-org.onap.ccsdk.sli.jdbc.hosts=dbhost
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://dbhost:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.hosts=${MYSQL_HOST}
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://${MYSQL_HOST}:3306/${MYSQL_DATABASE}
org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver
-org.onap.ccsdk.sli.jdbc.database=sdnctl
-org.onap.ccsdk.sli.jdbc.user=sli
-org.onap.ccsdk.sli.jdbc.password=abc123
+org.onap.ccsdk.sli.jdbc.database=${MYSQL_DATABASE}
+org.onap.ccsdk.sli.jdbc.user=${MYSQL_USER}
+org.onap.ccsdk.sli.jdbc.password=${MYSQL_PASSWORD}
org.onap.ccsdk.sli.jdbc.connection.name=dbhost
org.onap.ccsdk.sli.jdbc.connection.timeout=50
org.onap.ccsdk.sli.jdbc.request.timeout=100
diff --git a/ms/sliboot/src/main/resources/svclogic.properties b/ms/sliboot/src/main/resources/svclogic.properties
index 76865dd1..4dd6b0bd 100644
--- a/ms/sliboot/src/main/resources/svclogic.properties
+++ b/ms/sliboot/src/main/resources/svclogic.properties
@@ -20,10 +20,10 @@
###
org.onap.ccsdk.sli.dbtype = jdbc
-org.onap.ccsdk.sli.jdbc.url=jdbc:mariadb://dbhost:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url=jdbc:mariadb://${MYSQL_HOST}:3306/${MYSQL_DATABASE}
org.onap.ccsdk.sli.jdbc.driver=org.mariadb.jdbc.Driver
-org.onap.ccsdk.sli.jdbc.database = sdnctl
-org.onap.ccsdk.sli.jdbc.user = sli
-org.onap.ccsdk.sli.jdbc.password = abc123
+org.onap.ccsdk.sli.jdbc.database = ${MYSQL_DATABASE}
+org.onap.ccsdk.sli.jdbc.user = ${MYSQL_USER}
+org.onap.ccsdk.sli.jdbc.password = ${MYSQL_PASSWORD}
sliapi.serviceLogicDirectory=/opt/onap/sdnc/svclogic/graphs