Terracotta Ehcache 10.1 | Ehcache API Developer Guide | Configuring a CacheManager Using XML | Property replacement in XML configuration files
 
Property replacement in XML configuration files
Java system properties can be referenced inside XML configuration files. The property value will replace the property reference during the configuration parsing.
This is done by using the ${prop.name} syntax. It is supported in all attributes and elements values that accept the ${} characters as legal characters. This currently rules out all numbers, mostly used in sizing things, and identifiers, such as cache and template names.
Note: If the system property does not exist, this will make the configuration parsing fail.
A classical use case for this feature is for providing a disk file location inside the directory attribute of the persistence tag:
<persistence directory="${user.home}/cache-data"/> <!-- 1 -->
1
Here user.home will be replaced by the value of the system property, for example /home/user.

Copyright © 2010-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release