aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-15 06:41:15 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-15 06:41:15 +0200
commite70ec39488c0688d8144fa529d58d60ae9564fbd (patch)
tree07ef8e905d56b5ab2142f7a787d98317debcb38d /src/main/resources
parent1c252d7fc336831188c628ecdd39cd1b84b0cada (diff)
downloadmoa-zs-e70ec39488c0688d8144fa529d58d60ae9564fbd.tar.gz
moa-zs-e70ec39488c0688d8144fa529d58d60ae9564fbd.tar.bz2
moa-zs-e70ec39488c0688d8144fa529d58d60ae9564fbd.zip
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.
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/application.properties5
-rw-r--r--src/main/resources/application.yaml28
-rw-r--r--src/main/resources/mzs/app2mzs.xsd1
3 files changed, 30 insertions, 4 deletions
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 @@
<xs:element name="Config" type="ConfigType"/>
<xs:complexType name="ConfigType">
<xs:sequence>
+ <xs:element name="ProfileID" type="xs:token"></xs:element>
<xs:element ref="Server" minOccurs="0"></xs:element>
<xs:element name="PerformQueryPersonRequest" type="xs:boolean" minOccurs="0" />
</xs:sequence>