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.
I had the same requirement like yours( war package instead of a fat jar) and I manged to externalize the configuration file: In my main class I made this configuration:
@SpringBootApplication
@PropertySource("file:D:\\Projets\\XXXXX\\Config\\application.properties")
public class WyApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(WyApplication.class, args);
}
}
Hope this will help you. Good luck.