Merge pull request #82 from weltonrodrigo/patch-2
Variable interpolation section on configuration doc
diff --git a/configuration.md.vtl b/configuration.md.vtl
index ae08db5..c21650f 100644
--- a/configuration.md.vtl
+++ b/configuration.md.vtl
@@ -25,6 +25,7 @@
* [Nested Properties](#Configuration-NestedProperties)
* [Byte Array Values](#Configuration-ByteArrayValues)
* [Collection Properties](#Configuration-CollectionProperties)
+ * [Variable Interpolation](#Configuration-VariableInterpolation)
* [Considerations](#Configuration-Considerations)
@@ -342,6 +343,26 @@
...
```
+<a name="Configuration-VariableInterpolation"></a>
+#[[######Variable Interpolation]]#
+
+You can use variable interpolation when defining values. Supported types are environment variables, system properties and constants.
+
+For constants, use `${const:com.example.YourClass.CONSTANT_NAME}`, for environment variables and system properties, use `${ENV_VARIABLE_NAME}` or `${system.property}`.
+
+System properties and environment variables are lookup up in that order.
+
+Default values are supported in the form `${const:com.example.YourClass.CONSTANT_NAME:-default_value`}, or `${VARIABLE_NAME:-default_value}`, as in:
+
+``` ini
+myRealm.connectionTimeout = ${REALM_CONNECTION_TIMEOUT:-3000}
+```
+
+Which will be interpreted as `myRealm.connectionTimeout = 3000` if no system property or environment variable `REALM_CONNECTION_TIMEOUT` is defined.
+
+If no replacement is found, the definition will remain unchanged.
+
+
<a name="Configuration-Considerations"></a>
#[[#####Considerations]]#