A configuration library for JVM languages using HOCON files, supporting JSON, properties, and environment variable substitution.
Lightbend Config is a configuration library for JVM languages that provides a unified way to manage application settings using HOCON, JSON, and properties files. It solves the problem of handling complex, multi-environment configurations by supporting merges, substitutions, and type-safe access. The library is designed to be immutable and thread-safe, making it suitable for modern JVM applications.
JVM developers building applications in Java, Scala, Kotlin, or other JVM languages who need robust, maintainable configuration management. It is especially useful for projects with multiple deployment environments or complex configuration hierarchies.
Developers choose Lightbend Config for its human-friendly HOCON syntax, strong support for variable substitution and includes, and its immutable, thread-safe API. It is a mature, widely-adopted library that integrates seamlessly with system properties and environment variables, reducing boilerplate and configuration errors.
configuration library for JVM languages using HOCON files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses a JSON superset with comments, includes, and substitutions, making configuration files more readable and maintainable than plain JSON or properties files, as detailed in the HOCON.md spec.
Based on immutable Config instances, ensuring safe concurrent access and predictable behavior in multi-threaded environments without synchronization overhead.
Supports loading from files, URLs, classpath resources, and system properties with automatic merging and priority-based overriding, simplifying multi-environment deployments.
Converts values between strings, booleans, durations, and sizes (e.g., '10 seconds' or '512k'), reducing parsing boilerplate and potential errors as highlighted in the features list.
Configurations are immutable and loaded once; updating settings at runtime requires manual reloading with ConfigFactory.invalidateCaches() or custom code, which can be cumbersome for dynamic environments.
The library limits itself to config files, so loading from databases or other custom sources requires writing additional code, as admitted in the README's overview section.
Lacks a formal schema language; validation relies on manual checks using methods like checkValid() or external tools, which may not catch all errors early and increases boilerplate for complex configs.