java - How do I add external property file location to Spring Boot application deployed to tomcat 6? -


i have spring boot application configure annotations. have application.properties , application-{profile}.properties files data in them. problem want define war-external location on tomcat 6 server can put configuration files that take precedence. is, settings put in properties files should trump values in application.properties or application-{profile}.properties.

how can accomplish in easiest possible way?

i have tried add @propertysources has lower priority in properties files order not possible solution. can change property file loading order easily?

it not possible add environment variables server, since might affect other deployed applications. war must self-contained , deliver needs (except external properties override file).

you configure spring.config.location as described in doc or implement environmentpostprocessor if want apply regardless.

there sample in university session @ devoxx we showcase how read file home directory , add after command line properties. pretty same thing , order them way want.

the sample app available here if want give try.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -