add note with clarification how to pass -Dconfig properly; taken from https://github.com/lightbend/config/issues/84 and https://stackoverflow.com/a/31305181/5151861

This commit is contained in:
iamtodor 2022-03-30 22:07:59 +02:00
parent d62bd12998
commit fad9affc97

View File

@ -257,6 +257,8 @@ system properties can be used to force a different config source
it should include the extension, not be a basename
- `config.url` specifies a URL
**Note**: you need to pass `-Dconfig.file=path/to/config-file` before the jar itself, e.g. `java -Dconfig.file=path/to/config-file.conf -jar path/to/jar-file.jar`
These system properties specify a _replacement_ for
`application.{conf,json,properties}`, not an addition. They only
affect apps using the default `ConfigFactory.load()`