From e70ec39488c0688d8144fa529d58d60ae9564fbd Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 15 May 2019 06:41:15 +0200 Subject: WIP: Generate Map of Config Profiles from Spring Environment Augmenter - Replace default Config Profile with map of Config Profiles. Now, Augmenter can choose a config profile at runtime and augment it. - Move Augmenter to sub package. WIP - Implement ConfigProfileGenerator, which retrieves Config profiles from Spring Environment and returns an easy-to-use map with profiles that is keyed with profile id's. - Replace application.properties with application.yaml. - Remove Augmenter test cases: They need to be adapted. --- src/main/resources/application.properties | 5 +---- src/main/resources/application.yaml | 28 ++++++++++++++++++++++++++++ src/main/resources/mzs/app2mzs.xsd | 1 + 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/application.yaml (limited to 'src/main/resources') diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7bd66e2..8b13789 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,4 +1 @@ -spring.redis.host=172.17.0.2 -spring.redis.port=6379 -## activate cluster mode -# spring.profiles.active=cluster + diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml new file mode 100644 index 0000000..98987b8 --- /dev/null +++ b/src/main/resources/application.yaml @@ -0,0 +1,28 @@ +spring: + redis: + host: 172.17.0.2 + port: 6379 + +## activate cluster mode +# profiles: +# active: cluster + +# Configure parameters here or in DeliveryRequest/Config. +# Choose a profile in DeliveryRequest/Config/ProfileId. +# If a parameter is missing, moa zs falls back to default +# Order: DeliveryRequest/Config > [chosen-profile] > default +delivery-request-configuration-profiles: + default: + msg: + url: http://localhost:8090/ + x509: todo! + perform-query-person-request: false + + app-profile-1: + msg: + url: https://msg-url1.com + perform-query-person-request: true + + app-profile-2: + msg: + url: https://msg-url2.com \ No newline at end of file diff --git a/src/main/resources/mzs/app2mzs.xsd b/src/main/resources/mzs/app2mzs.xsd index e97e9b6..91e52c8 100644 --- a/src/main/resources/mzs/app2mzs.xsd +++ b/src/main/resources/mzs/app2mzs.xsd @@ -80,6 +80,7 @@ + -- cgit v1.2.3