blob: 296da5dd54ca7ab644a78cb7c6828f72d05c1994 [file] [log] [blame]
<!--
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy current the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
// -->
<configuration>
<!-- Context is evaluated first. -->
<context>
<stage>${properties:system:STAGE?default=DEV}</stage>
<configdir>${properties:system:configdir?default=.}</configdir>
<app>${properties:system.APP?default=NONE}</app>
<context>${java:java.util.UUID.randomUUID()}</context>
<company>Trivadis</company>
<default-formats>yaml,json</default-formats>
<default-refresh-period>5 SECOND</default-refresh-period>
</context>
<context name="APP">
<application>someAppName</application>
</context>
<!-- combinationPolicy class="" / -->
<!-- Configuration definition. -->
<sources>
<env-properties enabled="${context('stage')=='TEST' || context('stage')=='PTA' || context('stage')=='PROD'}">
<filters>
<Map target="ENV."/>
<Mask policy="MULTIVALUE"
mask="*****"
matches="SEC_"/>
</filters>
</env-properties>
<sys-properties >
<filters>
<Immutable />
</filters>
</sys-properties>
<file location="config.json" refreshable="true" />
<file location="config.xml" formats="xml-properties" refreshable="true" />
<resource location="/META-INF/application-config.yml"/>
<ch.mypack.MyClassSource />
<!--<include enabled="${CONTEXT('stage')==TEST}">TEST-config.xml</include>-->
<resources location="${context('configdir')}/**/*.json" enabled="${context('configdir') != null}" />
<url location="https://www.confdrive.com/cfg/customerId=1234"
formats="json"
refreshable="true">
<filters>
<Cached ttl="30 SECOND"/>
</filters>
</url>
</sources>
<filters>
<Secured roles="admin,power-user" matches="*.secret" policy="HIDE"/>
<Cached timeout="30000" maxSize="300" matches="cached.*"/>
</filters>
<converters>
<!--<converter type="AllInOneConverter"/>-->
<defaults/>
</converters>
<log>
"METACONTEXT: " + MetaContext.getInstance().getProperties()
"CONFIG : " + config
</log>
</configuration>