I am developing a spring boot application
I want to override some properties in src/main/resources/application.properties
with an external file (e.g.
1) Tomcat allows you to define context parameters 2) Spring Boot will read the properties defined in Tomcat context parameters as if you are defining them as -Dsomething=some_value
Option 1: Hence a possible way is for you to define spring.config.location at the Tomcat context paramter:
Option 2: define a system property at the Tomcat's setenv.sh file
Dspring.config.location=/path/to/application.properties
Option 3: define an environment variable: SPRING_CONFIG_LOCATION