From 24a848dc9f24044911df541bb46c9ca7ef930f1d Mon Sep 17 00:00:00 2001 From: "woo-jin.shin" Date: Wed, 17 Nov 2021 23:49:30 +0900 Subject: [PATCH] [PPN-211113] Re-structure properties --- .../resources/application-development.yml | 5 ++-- .../main/resources/application-production.yml | 10 ++++++++ processor/src/main/resources/application.yml | 4 ++-- .../resources/application-development.yml | 1 - receiver/src/main/resources/application.yml | 7 ++++-- .../src/main/resources/logback-spring.xml | 11 +++++++++ .../logback/component/logback-file.xml | 23 +++++++++++++++++++ .../resources/logback/logback-development.xml | 19 +++++++++++++++ .../resources/logback/logback-production.xml | 19 +++++++++++++++ .../main/resources/production/production.yml | 5 ---- .../main/resources/production/webclient.yml | 5 ++++ .../resources/application-development.yml | 3 +++ sender/src/main/resources/application.yml | 10 ++++---- .../main/resources/development/webclient.yml | 5 ---- sender/src/main/resources/logback-spring.xml | 11 +++++++++ .../logback/component/logback-file.xml | 23 +++++++++++++++++++ .../resources/logback/logback-development.xml | 19 +++++++++++++++ .../resources/logback/logback-production.xml | 19 +++++++++++++++ 18 files changed, 178 insertions(+), 21 deletions(-) create mode 100644 processor/src/main/resources/application-production.yml create mode 100644 receiver/src/main/resources/logback-spring.xml create mode 100644 receiver/src/main/resources/logback/component/logback-file.xml create mode 100644 receiver/src/main/resources/logback/logback-development.xml create mode 100644 receiver/src/main/resources/logback/logback-production.xml delete mode 100644 receiver/src/main/resources/production/production.yml create mode 100644 receiver/src/main/resources/production/webclient.yml delete mode 100644 sender/src/main/resources/development/webclient.yml create mode 100644 sender/src/main/resources/logback-spring.xml create mode 100644 sender/src/main/resources/logback/component/logback-file.xml create mode 100644 sender/src/main/resources/logback/logback-development.xml create mode 100644 sender/src/main/resources/logback/logback-production.xml diff --git a/processor/src/main/resources/application-development.yml b/processor/src/main/resources/application-development.yml index 88741dc..6341010 100644 --- a/processor/src/main/resources/application-development.yml +++ b/processor/src/main/resources/application-development.yml @@ -5,10 +5,11 @@ spring: import: - "configserver:http://192.168.0.100:11080" - classpath:/development/webclient.yml - - classpath:/development/temppassword.yml - - classpath:/development/database.yml profiles: group: development: development, datasource-development +server: + port: 20081 + # import: optional:configserver:http://localhost:11080 # can be start up even config server was not found. \ No newline at end of file diff --git a/processor/src/main/resources/application-production.yml b/processor/src/main/resources/application-production.yml new file mode 100644 index 0000000..892c27d --- /dev/null +++ b/processor/src/main/resources/application-production.yml @@ -0,0 +1,10 @@ +spring: + config: + activate: + on-profile: development + import: + - "configserver:http://192.168.0.100:11080" + - classpath:/development/webclient.yml + profiles: + group: + development: development, datasource-development diff --git a/processor/src/main/resources/application.yml b/processor/src/main/resources/application.yml index 613bb66..b8b84f6 100644 --- a/processor/src/main/resources/application.yml +++ b/processor/src/main/resources/application.yml @@ -4,13 +4,13 @@ spring: main: allow-bean-definition-overriding: true profiles: - active: development + active: ${SPRING_ACTIVE_PROFILE:development} freemarker: enabled: false server: - port: 20081 + port: 20080 error: whitelabel: enabled: false diff --git a/receiver/src/main/resources/application-development.yml b/receiver/src/main/resources/application-development.yml index 34f30c9..70ac133 100644 --- a/receiver/src/main/resources/application-development.yml +++ b/receiver/src/main/resources/application-development.yml @@ -4,4 +4,3 @@ spring: on-profile: development import: - classpath:/development/webclient.yml - - classpath:/development/temppassword.yml diff --git a/receiver/src/main/resources/application.yml b/receiver/src/main/resources/application.yml index 89b6a30..61ebab9 100644 --- a/receiver/src/main/resources/application.yml +++ b/receiver/src/main/resources/application.yml @@ -4,9 +4,12 @@ spring: main: allow-bean-definition-overriding: true profiles: - active: development + active: ${SPRING_ACTIVE_PROFILE:development} freemarker: enabled: false server: - port: 20080 \ No newline at end of file + port: 20080 + error: + whitelabel: + enabled: false \ No newline at end of file diff --git a/receiver/src/main/resources/logback-spring.xml b/receiver/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..f0fcb6c --- /dev/null +++ b/receiver/src/main/resources/logback-spring.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/receiver/src/main/resources/logback/component/logback-file.xml b/receiver/src/main/resources/logback/component/logback-file.xml new file mode 100644 index 0000000..65e54db --- /dev/null +++ b/receiver/src/main/resources/logback/component/logback-file.xml @@ -0,0 +1,23 @@ + + + + + ${DIRECTORY}/${LOG_FILE_BASE}_log + + ${DIRECTORY}/${LOG_FILE_BASE}_log.%d{yyyyMMdd}.%i + + 1000MB + + 60 + + + ${FILE_LOG_PATTERN} + ${IMMEDIATE_FLUSH} + + + + 1024 + + + diff --git a/receiver/src/main/resources/logback/logback-development.xml b/receiver/src/main/resources/logback/logback-development.xml new file mode 100644 index 0000000..458e3d8 --- /dev/null +++ b/receiver/src/main/resources/logback/logback-development.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/receiver/src/main/resources/logback/logback-production.xml b/receiver/src/main/resources/logback/logback-production.xml new file mode 100644 index 0000000..f824e41 --- /dev/null +++ b/receiver/src/main/resources/logback/logback-production.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/receiver/src/main/resources/production/production.yml b/receiver/src/main/resources/production/production.yml deleted file mode 100644 index 8bc6223..0000000 --- a/receiver/src/main/resources/production/production.yml +++ /dev/null @@ -1,5 +0,0 @@ -webclient: - base-url: http://ppomppu_notifier_processor:20080 - units: - - unit-name: processor-api - base-url: http://ppomppu_notifier_processor:20080 diff --git a/receiver/src/main/resources/production/webclient.yml b/receiver/src/main/resources/production/webclient.yml new file mode 100644 index 0000000..18322d9 --- /dev/null +++ b/receiver/src/main/resources/production/webclient.yml @@ -0,0 +1,5 @@ +webclient: + base-url: http://ppn_processor:20080 + units: + - unit-name: processor-api + base-url: http://ppn_processor:20080 diff --git a/sender/src/main/resources/application-development.yml b/sender/src/main/resources/application-development.yml index 7fc61ce..b821007 100644 --- a/sender/src/main/resources/application-development.yml +++ b/sender/src/main/resources/application-development.yml @@ -9,3 +9,6 @@ spring: profiles: group: development: development, slackapi-development + +server: + port: 20081 diff --git a/sender/src/main/resources/application.yml b/sender/src/main/resources/application.yml index 5097f71..cb42b9d 100644 --- a/sender/src/main/resources/application.yml +++ b/sender/src/main/resources/application.yml @@ -1,19 +1,21 @@ spring: application: -# name: ppn-sender - name: app1 + name: ppn-sender main: allow-bean-definition-overriding: true profiles: - active: development + active: ${SPRING_ACTIVE_PROFILE:development} freemarker: enabled: false server: port: 20080 + error: + whitelabel: + enabled: false management: endpoints: web: exposure: - include: refresh + include: refresh, env diff --git a/sender/src/main/resources/development/webclient.yml b/sender/src/main/resources/development/webclient.yml deleted file mode 100644 index abe8b3b..0000000 --- a/sender/src/main/resources/development/webclient.yml +++ /dev/null @@ -1,5 +0,0 @@ -webclient: - base-url: http://localhost:20081 - units: - - unit-name: processor-api - base-url: http://localhost:20081 \ No newline at end of file diff --git a/sender/src/main/resources/logback-spring.xml b/sender/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..f0fcb6c --- /dev/null +++ b/sender/src/main/resources/logback-spring.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/sender/src/main/resources/logback/component/logback-file.xml b/sender/src/main/resources/logback/component/logback-file.xml new file mode 100644 index 0000000..65e54db --- /dev/null +++ b/sender/src/main/resources/logback/component/logback-file.xml @@ -0,0 +1,23 @@ + + + + + ${DIRECTORY}/${LOG_FILE_BASE}_log + + ${DIRECTORY}/${LOG_FILE_BASE}_log.%d{yyyyMMdd}.%i + + 1000MB + + 60 + + + ${FILE_LOG_PATTERN} + ${IMMEDIATE_FLUSH} + + + + 1024 + + + diff --git a/sender/src/main/resources/logback/logback-development.xml b/sender/src/main/resources/logback/logback-development.xml new file mode 100644 index 0000000..458e3d8 --- /dev/null +++ b/sender/src/main/resources/logback/logback-development.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sender/src/main/resources/logback/logback-production.xml b/sender/src/main/resources/logback/logback-production.xml new file mode 100644 index 0000000..f824e41 --- /dev/null +++ b/sender/src/main/resources/logback/logback-production.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +