typesafehub/config - 0 views
-
Pablo Lalloni on 10 Oct 13"Configuration library for JVM languages. Overview implemented in plain Java with no dependencies extensive test coverage supports files in three formats: Java properties, JSON, and a human-friendly JSON superset merges multiple files across all formats can load from files, URLs, or classpath good support for "nesting" (treat any subtree of the config the same as the whole config) users can override the config with Java system properties, java -Dmyapp.foo.bar=10 supports configuring an app, with its framework and libraries, all from a single file such as application.conf parses duration and size settings, "512k" or "10 seconds" converts types, so if you ask for a boolean and the value is the string "yes", or you ask for a float and the value is an int, it will figure it out. JSON superset features: comments includes substitutions ("foo" : ${bar}, "foo" : Hello ${who}) properties-like notation (a.b=c) less noisy, more lenient syntax substitute environment variables This library limits itself to config files. If you want to load config from a database or something, you would need to write some custom code. The library has nice support for merging configurations so if you build one from a custom source it's easy to merge it in."