1

I am building a webapplication using Spring Boot, and wish to externalize my configuration. I wish to do this for both my spring.datasource.* information, and other information, which I can apparently inject using @Value("${name}"), for example.

I was wondering where I can actually place this file during development (on a Windows machine), and for production (on a Linux machine), in a way that keeps sensitive information out of my code versioning system.

1 Answer 1

1

You can place a application.properties aside to the fat-jar, so you don't need to provide the sensitive properties at buildtime and keep them out of your VCS.

Have a look at boots reference guide - externalized configuration section for your several options. And this section for location-order.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.