Skip to content

How to load an external property file to Spring Boot in Wildfly

I wonder how can I load an external property of my application running inside Wildfly 9 as WAR, I tried to add a java parameter to Wildfly execution but it seems the application did not recognize the properties.


Is there any way how Spring Boot could read the external property file? I am trying to load and run one Spring Boot application as WAR inside Wildfly.

I’d appreciate any help.




In my linux system i have an entry in the standalone.xml:

    <property name="spring.config.location" value="file:/opt/jboss/wildfly/standalone/configuration/"/>

I just defined the directory here, so it has to end with an “/”.

In the directory “/opt/jboss/wildfly/standalone/configuration/” there is my application.yml.

5 People found this is helpful