Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Java
  3. config

config

Javav1.4.9

A configuration library for JVM languages using HOCON files, supporting JSON, properties, and environment variable substitution.

Visit WebsiteGitHubGitHub
6.3k stars978 forks0 contributors

What is config?

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.

Target Audience

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.

Value Proposition

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.

Overview

configuration library for JVM languages using HOCON files

Use Cases

Best For

  • Managing application settings across development, staging, and production environments
  • JVM projects that need to merge configuration from multiple files or formats
  • Applications requiring environment-specific overrides via system properties or environment variables
  • Teams wanting a type-safe, immutable configuration API to avoid runtime errors
  • Projects using HOCON files for human-readable configuration with comments and substitutions
  • Libraries that need to provide default configurations while allowing app-level overrides

Not Ideal For

  • Applications requiring real-time configuration updates without restarts, as the library is immutable and lacks built-in hot reloading.
  • Non-JVM projects, since it's specifically designed for Java Virtual Machine languages and doesn't support other platforms natively.
  • Teams heavily invested in YAML configuration ecosystems, as Lightbend Config does not support YAML out of the box and would require conversion or custom handling.
  • Simple command-line tools or microservices where a lightweight, zero-dependency config parser suffices, due to the library's comprehensive but heavier feature set and Java dependency.

Pros & Cons

Pros

Human-Optimized HOCON Syntax

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.

Immutable and Thread-Safe API

Based on immutable Config instances, ensuring safe concurrent access and predictable behavior in multi-threaded environments without synchronization overhead.

Flexible Configuration Loading

Supports loading from files, URLs, classpath resources, and system properties with automatic merging and priority-based overriding, simplifying multi-environment deployments.

Automatic Type Conversion

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.

Cons

No Built-in Hot Reload

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.

Complex Custom Source Integration

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.

Limited Schema Validation

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.

Frequently Asked Questions

Quick Stats

Stars6,319
Forks978
Contributors0
Open Issues241
Last commit17 days ago
CreatedSince 2011

Tags

#environment-variables#java#configuration#properties#scala#jvm#json#hocon

Built With

J
Java

Links & Resources

Website

Included in

Java47.5k
Auto-fetched 1 day ago

Related Projects

ownerowner

Get rid of the boilerplate code in properties based configuration.

Stars939
Forks213
Last commit2 days ago
centraldogmacentraldogma

Highly-available version-controlled service configuration repository based on Git, ZooKeeper and HTTP/2

Stars672
Forks136
Last commit4 days ago
ConfigurateConfigurate

A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation

Stars468
Forks87
Last commit3 days ago
GestaltGestalt

A Java configuration library

Stars104
Forks7
Last commit16 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub