We want to populate the properties used in our Spring Boot app from an external source.
I tried using
@PropertySource(value = "file:\C:\app\ConfFolder\common.properties")
which works but is hard coded. I want to use a variable instead of C:appConfFoldercommon.properties. We want to run it via
java -DconfFile=C:\app\ConfFolder\common.properties jar SampleApp.jar
How should we do it?
1