From 5835a8d5d6a83346123c784db6c14a3ee38511fc Mon Sep 17 00:00:00 2001 From: Sergiu Bodiu Date: Mon, 10 Apr 2023 13:28:44 +0800 Subject: [PATCH] FLPATH-274 enable spring-cloud-config --- notification-service/pom.xml | 4 +++ .../src/main/resources/application-dev.yml | 4 --- .../src/main/resources/application-local.yml | 9 +++--- .../src/main/resources/application.yml | 5 ++- workflow-service/pom.xml | 6 ++++ .../src/main/resources/application-dev.yml | 4 +-- .../src/main/resources/application-local.yml | 31 +++++++++---------- .../src/main/resources/application.yml | 3 ++ 8 files changed, 38 insertions(+), 28 deletions(-) diff --git a/notification-service/pom.xml b/notification-service/pom.xml index 294556a6f..a9189814d 100644 --- a/notification-service/pom.xml +++ b/notification-service/pom.xml @@ -185,6 +185,10 @@ jackson-databind-nullable ${jackson-databind-nullable-version} + + org.springframework.cloud + spring-cloud-starter-config + diff --git a/notification-service/src/main/resources/application-dev.yml b/notification-service/src/main/resources/application-dev.yml index 364a8a775..847d88d88 100644 --- a/notification-service/src/main/resources/application-dev.yml +++ b/notification-service/src/main/resources/application-dev.yml @@ -32,10 +32,6 @@ spring: username: postgres password: postgres -springdoc: - writer-with-order-by-keys: true - writer-with-default-pretty-printer: true - # =================================================================== # Application specific properties # Add your own application properties here, see the diff --git a/notification-service/src/main/resources/application-local.yml b/notification-service/src/main/resources/application-local.yml index ca23d6a65..9f6f81c52 100644 --- a/notification-service/src/main/resources/application-local.yml +++ b/notification-service/src/main/resources/application-local.yml @@ -1,5 +1,5 @@ # =================================================================== -# Spring Boot configuration for the "dev" profile. +# Spring Boot configuration for the "local" profile. # # This configuration overrides the application.yml file and should be # only used for development purpose. @@ -43,9 +43,10 @@ spring: username: postgres password: postgres -springdoc: - writer-with-order-by-keys: true - writer-with-default-pretty-printer: true + cloud: + config: + enabled: true + import: optional:configserver:http://localhost:8888 # =================================================================== # Application specific properties diff --git a/notification-service/src/main/resources/application.yml b/notification-service/src/main/resources/application.yml index b780eef43..082528f9f 100644 --- a/notification-service/src/main/resources/application.yml +++ b/notification-service/src/main/resources/application.yml @@ -6,7 +6,10 @@ spring: default-property-inclusion: non_null main: lazy-initialization: true + cloud: + config: + enabled: false springdoc: writer-with-order-by-keys: true - writer-with-default-pretty-printer: true + writer-with-default-pretty-printer: true \ No newline at end of file diff --git a/workflow-service/pom.xml b/workflow-service/pom.xml index ad3ad8001..36ea4d6b5 100644 --- a/workflow-service/pom.xml +++ b/workflow-service/pom.xml @@ -183,6 +183,12 @@ prebuilt-tasks ${revision} + + + org.springframework.cloud + spring-cloud-starter-config + + diff --git a/workflow-service/src/main/resources/application-dev.yml b/workflow-service/src/main/resources/application-dev.yml index 7be75cce6..a2d42f030 100644 --- a/workflow-service/src/main/resources/application-dev.yml +++ b/workflow-service/src/main/resources/application-dev.yml @@ -17,9 +17,7 @@ spring: managerPassword: "admin" lifecycle: timeout-per-shutdown-phase: "25s" -springdoc: - writer-with-order-by-keys: true - writer-with-default-pretty-printer: true + management: endpoint: shutdown: diff --git a/workflow-service/src/main/resources/application-local.yml b/workflow-service/src/main/resources/application-local.yml index 2de37f38e..c57f3a97c 100644 --- a/workflow-service/src/main/resources/application-local.yml +++ b/workflow-service/src/main/resources/application-local.yml @@ -17,19 +17,18 @@ spring: managerPassword: null lifecycle: timeout-per-shutdown-phase: "25s" -springdoc: - writer-with-order-by-keys: true - writer-with-default-pretty-printer: true -management: - endpoint: - shutdown: - enabled: true - health: - enabled: true - endpoints: - enabled-by-default: false - web: - exposure: - include: "health,shutdown" -server: - shutdown: "graceful" + cloud: + enabled: true + config: + import: optional:configserver:http://localhost:8888 + +logging: + level: + ROOT: INFO + com.redhat.parodos.workflow: DEBUG + +# =================================================================== +# Application specific properties +# Add your own application properties here, see the +# ApplicationProperties class to have type-safe configuration +# =================================================================== \ No newline at end of file diff --git a/workflow-service/src/main/resources/application.yml b/workflow-service/src/main/resources/application.yml index 37ad52ad8..77d5de95c 100644 --- a/workflow-service/src/main/resources/application.yml +++ b/workflow-service/src/main/resources/application.yml @@ -47,6 +47,9 @@ spring: lifecycle: timeout-per-shutdown-phase: "25s" + cloud: + config: + enabled: false management: endpoint: shutdown: