I have multi-module Maven project with four Spring Boot 2.3.x applications as WAR files. I understand how to manage properties for each application for different profiles (dev, test, qa) when they run independently.
Now I deploy the applications on an external Tomcat 9.x server and I would like to have external property files for every single Spring Boot application.
The property files should be externalized outside Tomcat on the file system like this:
c:/webapp/spring-config/boot-app1-prod.properties c:/webapp/spring-config/boot-app2-prod.properties c:/webapp/spring-config/boot-app3-prod.properties c:/webapp/spring-config/boot-app4-prod.properties So for my understanding "spring.config.location" is not an option, because I can only specify the location and one property file per Tomcat instance.
I would like to externalize those files only for the active profile 'prod', so this is set:
spring.profiles.active=prod Question:
What is best practice to achieve this? Spring Cloud Config is not an option at this time.