Dmitry Dmitry - 5 months ago 45
Java Question

How to use custom system property resolver in Wildfly

We use Wildfly 9.0.2 server and we need to use custom property resolver to inject values to system-properties in standalone.xml, to make something like:

<property name="my-property" value="${custom:property-value-key}" />

Is there mechanism similar to the one provided by Tomcat (org.apache.tomcat.util.digester.PROPERTY_SOURCE property)?

Thank you!


Since there is no easy programmatic way to inject custom properties to standalone.xml, we decided to modify startup sh scripts to read data from Consul and set environment variables to WIldfly process and then read them as ${env.QLEO_DB_URL} in standalone.xml.