1

I want to load properties from external file present under my home directory. I set a environment variable using the file as follows

export ENV_HOME=/home/usr/environment.properties

I want to use the properties present in environemnt.properties files in spring-boot application. I don't want to include this in packed jar

How to achieve this?

1 Answer 1

1

Use @PropertySource("${ENV_HOME}") in controller will override the properties from external file.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.