In this recipe, you will learn how to deliver you configuration using property files. This might be handy if you do not want to put all your settings' hardcode into the XML files, thus having to change them for each of your environments. This way, you can provide the general configuration via XML files and provide specific settings for your specific environment via property files.
Thanks to the property substitution feature provided by WildFly, you can use the ${your.property.goes.here}
syntax inside the XML files (that are standalone.xml
or domain.xml
and host.xml
).
To get started, let's first create an ad-hoc
folder to run our WildFly. In a terminal window run the following commands:
$ cd $WILDFLY_HOME $ cp -a standalone sec-std-cfg-node-1
Now it's time to create some property!