From 25d68c8900c2cc791f03ea3db173955ca237fd55 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Fri, 12 Jul 2019 15:40:05 +0200 Subject: Allow App To Choose Between MsgResponse Sinks - MZS Schema Change: Add "MsgResponseSinks" element to mzs:DeliveryRequest/Config that allows sender to configure how MsgResponses should be archived. - ConfigUtil: Interpret MsgResponseSink parameters from Spring Environment and merge with ConfigType. - MsgResponseBackend: Send responses to sinks according to MsgResponseSinks in Config - application.yaml: Add MsgResponseSinks parameter to configuration. - Uncouple Sink implementations from java.util.function.Function, because the sink interfaces are going to differ and there is no need to unite them under one interface. - Add and test LogResponseSink, which logs responses to it's logger. - MsgResponse: Add JAXB getter for response. Reason: Can be passed to marshaller. --- src/main/resources/application.yaml | 60 ++++++++++++++++++++----------------- src/main/resources/mzs/app2mzs.xsd | 8 +++++ 2 files changed, 41 insertions(+), 27 deletions(-) (limited to 'src/main/resources') diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 0e7b67e..a04a903 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -1,11 +1,18 @@ -spring: - redis: - host: 172.17.0.2 - port: 6379 +### Logging +logging: + level: + root: WARN + org.springframework: WARN + at.gv: INFO #DEBUG + iaik: INFO #DEBUG + at.gv.egiz.moazs.backend: + SignatureVerifier: DEBUG + LogResponseSink: INFO -## activate cluster mode -# profiles: -# active: cluster +# Default type for java's ssl key/trust store +javax.net.ssl: + keyStoreType: jks + trustStoreType: jks # Configure parameters here or in DeliveryRequest/Config. # Choose a profile in DeliveryRequest/Config/ProfileId. @@ -23,8 +30,12 @@ delivery-request-configuration-profiles: # 0 means indefinitely. receive-timeout: 0 + # Specifies how MoaZS should + msg-response-sinks: + save-response-to-file: false + log-response: true + ssl-profile: - perform-query-person-request: false msg-client: url: https://localhost/zusemsg/services/DeliveryRequest ssl: @@ -43,24 +54,10 @@ delivery-request-configuration-profiles: ## JKS or PKCS12 type: PKCS12 -## If set to false, moa zs ignores an incomplete default DeliveryRequest-configuration -## profile and continues startup. See 'delivery-request-configuration-profiles'. -## Default value: true -# verify-completeness-of-default-delivery-request-configuration: false - -### logging -logging: - level: - root: WARN - org.springframework: WARN - at.gv: INFO #DEBUG - iaik: INFO #DEBUG - at.gv.egiz.moazs.backend.SignatureVerifier: DEBUG - -# default type for java's ssl key/trust store -javax.net.ssl: - keyStoreType: jks - trustStoreType: jks +# If set to false, moa zs ignores an incomplete default DeliveryRequest-configuration +# profile and continues startup. See 'delivery-request-configuration-profiles'. +# Default value: true +verify-completeness-of-default-delivery-request-configuration: true ### moa spss config moa.spss: @@ -74,6 +71,15 @@ moa.spss: configuration: moa-spss/MOASPSSConfiguration.xml default-trustprofile: test-trustprofile +spring: + redis: + host: 172.17.0.2 + port: 6379 + repository: # duration in minutes before repository records are evicted. - expiresAfterWrite: 30 \ No newline at end of file + expiresAfterWrite: 30 + +## activate cluster mode +# profiles: +# active: cluster diff --git a/src/main/resources/mzs/app2mzs.xsd b/src/main/resources/mzs/app2mzs.xsd index 659bbb9..ba99eab 100644 --- a/src/main/resources/mzs/app2mzs.xsd +++ b/src/main/resources/mzs/app2mzs.xsd @@ -98,6 +98,7 @@ + @@ -128,6 +129,13 @@ + + + + + + + -- cgit v1.2.3