Spring boot tomcat external properties file
I have a spring boot war file deployed in tomcat. I cannot use the properties file of external applications. I use the following to specify the path to the external properties files
X:\apache-tomcat-7.0.54\bin>startup.bat --Dspring.config.location=X:\conf\application.properties
I also tried it with qoutes
X:\apache-tomcat-7.0.54\bin>startup.bat "--Dspring.config.location=X:\conf\application.properties"
These properties do not work and spring reads the properties file that is contained in the war file. Can anyone help me with this? Thanks to
+3
amique
source
to share
1 answer
Try
-Dspring.config.location=file:X:/conf/application.properties
You need to add file:
if you need a file outside of the classpath
0
Sezin karli
source
to share