Skip to content

Releases: kasapdev/java-env-config

v1.2.0

Choose a tag to compare

@kasapdev kasapdev released this 07 Sep 20:04

Added

  • EnvConfig.section(String prefix) — returns a new EnvConfigSection view scoped to keys sharing a PREFIX_ separator. Given keys like DATABASE_HOST and DATABASE_PORT, config.section("DATABASE") exposes getString("HOST") and getInt("PORT") with the prefix stripped.
  • EnvConfigSection exposes the same typed accessors as EnvConfig (getString, getInt, getBoolean, has, keys, asMap), each delegating to the underlying EnvConfig'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 from EnvConfig does (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 ## Usage example for a more realistic startup sequence.

Zero new dependencies — still plain javac/java, Java 17.

v1.1.0

Choose a tag to compare

@kasapdev kasapdev released this 06 Sep 01:35

Adds edge-case regression tests: empty-key rejection, missing-file exception wrapping, unrecognized/tab escape sequence handling, multi-equals values, and duplicate-key last-wins semantics. No behavioral changes; all tests pass.

v1.0.0

Choose a tag to compare

@kasapdev kasapdev released this 05 Sep 23:41

Initial stable release.