I need two application.properties in my Spring Boot App.
I know that using the annotation @PropertySource
I can specify more than 1 property files.
I tried to use: @PropertySource({"classpath:application.properties","classpath:external.properties"})
The idea of it is having application.properties
with the machine independent properties and this file will be included inside the war file.
The other file (external.properties
), will leave in the machine, and won't be included in the war file. Here I want to leave properties like the database connection and so on.
I've already changed catalina.properties for adding the external.properties location into the classpath, but unfortunately when running on Eclipse it doesn't work (complains about the missing database properties.).