I have found the following has worked for me:
java -jar my-awesome-java-prog.jar --spring.config.location=file:/path-to-config-dir/
with file:
added.
LATE EDIT
Of course, this command line is never run as it is in production.
Rather I have
shell
scripts in source control with place holders for all parts of the command that could change (name of the jar, path to config...)ansible
deployment scripts that will deploy the shell
scripts and replace the place holders by the actual value.