From: Rishi Chail Date: Mon, 21 Sep 2020 10:27:32 +0000 (+0100) Subject: DP: Project Structure and basic conf X-Git-Tag: 0.0.1~120^2~25 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=b08767ed33915b9199f07cc9bca94b346e752196;p=cps.git DP: Project Structure and basic conf Issue-ID: CCSDK-2749 https: //jira.onap.org/browse/CCSDK-2749 Signed-off-by: Rishi Chail Change-Id: Ib2139263be435414855e2f487e96c2122f21c978 Signed-off-by: Rishi Chail --- diff --git a/cps/.gitignore b/cps/.gitignore index ba64fc2fd..624c9b63b 100644 --- a/cps/.gitignore +++ b/cps/.gitignore @@ -1,6 +1,8 @@ *.class *.jar *.war +*.zip +*.log target/ log/ diff --git a/cps/cps-rest/pom.xml b/cps/cps-rest/pom.xml index 41b5c42f3..0e8317b62 100644 --- a/cps/cps-rest/pom.xml +++ b/cps/cps-rest/pom.xml @@ -21,12 +21,6 @@ org.onap.cps cps-ri ${project.version} - - - org.springframework.boot - spring-boot-starter-data-jpa - - diff --git a/cps/cps-rest/src/main/java/org/onap/cps/rest/Application.java b/cps/cps-rest/src/main/java/org/onap/cps/Application.java similarity index 95% rename from cps/cps-rest/src/main/java/org/onap/cps/rest/Application.java rename to cps/cps-rest/src/main/java/org/onap/cps/Application.java index 3183efc65..9f6c2edce 100644 --- a/cps/cps-rest/src/main/java/org/onap/cps/rest/Application.java +++ b/cps/cps-rest/src/main/java/org/onap/cps/Application.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.cps.rest; +package org.onap.cps; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/cps/cps-rest/src/main/resources/application.yml b/cps/cps-rest/src/main/resources/application.yml index ab19fe9ab..bc726694c 100644 --- a/cps/cps-rest/src/main/resources/application.yml +++ b/cps/cps-rest/src/main/resources/application.yml @@ -4,6 +4,15 @@ server: spring: main: banner-mode: "off" + # for POC only, later this should move to cpi-ri module + jpa: + hibernate: + ddl-auto: create + datasource: + url: jdbc:mariadb://${DB_HOST}:3306/${DB_NAME} + username: ${USERNAME} + password: ${PWD} + driverClassName: org.mariadb.jdbc.Driver logging: level: diff --git a/cps/cps-rest/src/main/resources/logback-spring.xml b/cps/cps-rest/src/main/resources/logback-spring.xml index fce0aca2c..8a4ae07c5 100644 --- a/cps/cps-rest/src/main/resources/logback-spring.xml +++ b/cps/cps-rest/src/main/resources/logback-spring.xml @@ -19,7 +19,7 @@ ../log/${logName}.log - ${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip + ${logName}.%d{yyyy-MM-dd}.%i.log.zip ${maxFileSize} ${maxHistory} diff --git a/cps/cps-ri/pom.xml b/cps/cps-ri/pom.xml index 3d0ccf0af..0d6dcace4 100644 --- a/cps/cps-ri/pom.xml +++ b/cps/cps-ri/pom.xml @@ -11,6 +11,13 @@ + + org.onap.cps + cps-service + ${project.version} + compile + + org.springframework.boot spring-boot-starter-data-jpa @@ -21,6 +28,11 @@ spring-boot-starter-validation + + org.mariadb.jdbc + mariadb-java-client + + org.projectlombok lombok diff --git a/cps/cps-ri/src/main/resources/application.yml b/cps/cps-ri/src/main/resources/application.yml deleted file mode 100644 index fc6883346..000000000 --- a/cps/cps-ri/src/main/resources/application.yml +++ /dev/null @@ -1,8 +0,0 @@ -spring: - jpa: - hibernate: - ddl-auto: create - datasource: - url: jdbc:mariadb://${DB_HOST}:3306/${DB_NAME} - username: ${USERNAME} - password: ${PWD} \ No newline at end of file diff --git a/cps/cps-ri/src/main/resources/logback-spring.xml b/cps/cps-ri/src/main/resources/logback-spring.xml index fce0aca2c..8a4ae07c5 100644 --- a/cps/cps-ri/src/main/resources/logback-spring.xml +++ b/cps/cps-ri/src/main/resources/logback-spring.xml @@ -19,7 +19,7 @@ ../log/${logName}.log - ${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip + ${logName}.%d{yyyy-MM-dd}.%i.log.zip ${maxFileSize} ${maxHistory} diff --git a/cps/cps-service/src/main/resources/logback-spring.xml b/cps/cps-service/src/main/resources/logback-spring.xml index fce0aca2c..8a4ae07c5 100644 --- a/cps/cps-service/src/main/resources/logback-spring.xml +++ b/cps/cps-service/src/main/resources/logback-spring.xml @@ -19,7 +19,7 @@ ../log/${logName}.log - ${debugLogName}.%d{yyyy-MM-dd}.%i.log.zip + ${logName}.%d{yyyy-MM-dd}.%i.log.zip ${maxFileSize} ${maxHistory}