Releases: kasapdev/java-env-config
Releases · kasapdev/java-env-config
Release list
v1.2.0
Added
EnvConfig.section(String prefix)— returns a newEnvConfigSectionview scoped to keys sharing aPREFIX_separator. Given keys likeDATABASE_HOSTandDATABASE_PORT,config.section("DATABASE")exposesgetString("HOST")andgetInt("PORT")with the prefix stripped.EnvConfigSectionexposes the same typed accessors asEnvConfig(getString,getInt,getBoolean,has,keys,asMap), each delegating to the underlyingEnvConfig's own lookup and type-conversion logic against the fully-qualified key — error messages, default-value fallback, and type coercion behave identically to the top-level config.- A prefix that matches no keys is not an error:
section()returns a valid, empty section, and requesting a key from it behaves exactly as requesting a missing key fromEnvConfigdoes (throws for the required overload, returns the default for the(key, default)overload). - New regression tests covering multiple prefixed groups (
DATABASE_*,CACHE_*) scoped independently, cross-section key isolation, and the empty-section case — plus the full existing suite still passes unchanged. - README "Config Sections" section with a runnable example, and a second
## Usageexample for a more realistic startup sequence.
Zero new dependencies — still plain javac/java, Java 17.