CLI, system properties, environment variables, or JSON text/file input processing.
 
 
Go to file
Robinson 1d69c6d2e0
version 2.9.1
2024-01-22 17:41:22 +01:00
gradle/wrapper updated gradle 2023-08-20 13:25:37 +02:00
src/dorkbox/config version 2.9.1 2024-01-22 17:41:22 +01:00
src9 added json to JPMS 2023-08-06 00:55:39 -06:00
test/dorkbox Fixed issues with array/list expansion for loading, cli/sys/env. 2023-08-16 19:43:33 -05:00
.gitignore Initial import 2022-03-07 01:49:30 +01:00
LICENSE version 2.9 2024-01-20 10:09:36 +01:00
LICENSE.Apachev2 Initial split of configuration. 2022-03-07 08:15:57 +01:00
LICENSE.MIT Initial split of configuration. 2022-03-07 08:15:57 +01:00
README.md version 2.9.1 2024-01-22 17:41:22 +01:00
build.gradle.kts version 2.9.1 2024-01-22 17:41:22 +01:00
gradle.properties Initial split of configuration. 2022-03-07 08:15:57 +01:00
gradlew updated gradle 2023-08-20 13:25:37 +02:00
gradlew.bat updated gradle 2023-08-20 13:25:37 +02:00
settings.gradle.kts Hardcoded project name 2023-08-05 12:18:26 -06:00

README.md

Configuration properties that can be defined via the CLI, system properties, environment variables, or file.

Dorkbox Github Gitlab

This project provides configuration properties, such that ANYTHING in the config file can ALSO be passed in on the command line or as an env/system property

commandline > system property > environment variable > properties file

Once a property has been defined, it cannot be overloaded again via a different method, as specified in the above hierarchy,

During a save operation, overloaded values will be ignored unless they were manually changed to something different

Additionally, it is possible to set an environment variable names that might conflict with the standard set of names, for example,

PATH
  • The system uses PATH, but if we want to use path for something different, we can via setting the prefix.
  • For example, setting the prefix to CONFIG__ means that for us to set the path property, we set it via
CONFIG__path="/home/blah/whatever"
  • And this way, OUR path does not conflict with the system path.

Maven Info

<dependencies>
    ...
    <dependency>
      <groupId>com.dorkbox</groupId>
      <artifactId>Config</artifactId>
      <version>2.9.1</version>
    </dependency>
</dependencies>

Gradle Info

dependencies {
    ...
    implementation("com.dorkbox:Config:2.9.1")
}

License

This project is © 2022 dorkbox llc, and is distributed under the terms of the Apache v2.0 License. See file "LICENSE" for further references.