diff --git a/README.md b/README.md index 74b8cb2..3b05980 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,7 @@ Regarding `language.languageSetting` please check [languages](https://github.com/gaborbata/jpass/tree/master/src/main/resources/resources/languages) resources folder for possible configuration values. +Each configuration property can be overridden by system properties, with the `jpass.` key prefix, e.g. + + java -Djpass.entry.details=TITLE -jar jpass-1.0.6-SNAPSHOT.jar + diff --git a/src/main/java/jpass/util/Configuration.java b/src/main/java/jpass/util/Configuration.java index d1f0010..7f86f94 100644 --- a/src/main/java/jpass/util/Configuration.java +++ b/src/main/java/jpass/util/Configuration.java @@ -31,12 +31,18 @@ import java.io.File; import java.io.FileInputStream; import java.io.InputStream; +import java.util.Optional; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; /** - * Class for loading configurations from {@code jpass.properties}. + * Class for loading configurations from {@code jpass.properties} or system properties. + * + *
+ * Each configuration property can be overridden by system properties, + * with the {@code jpass.} prefix. + *
* * @author Gabor_Bata */ @@ -75,7 +81,7 @@ private File getConfigurationFolderPath() { private