I am having trouble getting environment variables to resolve On a Linux VM when I start up a WildFly java application.
<system-properties>
<property name="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/>
<property name="appname.url" value="https://${env.Environment}/appname"/>
</system-properties>
When I echo that environment variable (defined in /etc/environment) I get the following:
[ ~ ]$ echo $Environment
tst
I've tried updating the standalone.xml to have this these two properties set to true:
<subsystem xmlns="urn:jboss:domain:ee:4.0">
<spec-descriptor-property-replacement>true</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
Also tried updating bin/jboss-cli.xml with this setting set to true:
<resolve-parameter-values>true</resolve-parameter-values>
Starting the application using it's service (i.e., systemctl restart appname) throws errors in the logs like this:
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("system-property" => "appname.url")]) - failure description: "WFLYCTL0211: Cannot resolve expression 'https://${env.Environment}/appname'"
Unfortunately, this does not resolve my issue. Any ideas?