From fad9affc976d929b12a095ca0c729f1691ec6715 Mon Sep 17 00:00:00 2001 From: iamtodor Date: Wed, 30 Mar 2022 22:07:59 +0200 Subject: [PATCH] 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 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 63ebd43e..5e6d5157 100644 --- a/README.md +++ b/README.md @@ -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()`