0

Can we specify environment variable in Wildfly standalone.xml and module.xml file for some runtime configuration? we can do this in tomcat like this, i tried slimier by using JAVA_OPTS in wildly but its not working.

Community
  • 1
  • 1
Varun Jain
  • 495
  • 3
  • 9
  • 22

1 Answers1

3

You can set all the environment variables in standalone.conf.bat(Windows) and standalone.conf(linux) present under WILDFLY_HOME/bin directory.

You can also call them in standalone.xml file using ${env.variable_name}. for example: I have an environment variable DB_CONNECTION_URL and I want to use it in Wildfly. So, I will specify ${env.DB_CONNECTION_URL} for database connection URL in my wildfly configuration file.

James R. Perkins
  • 16,800
  • 44
  • 60
Atul
  • 1,536
  • 3
  • 21
  • 37