Twitter Follow Documentation Examples Maven Central JavaDoc GitHub license Travis

Overview

cfg4j ("configuration for Java") is a configuration library for Java distributed apps (and more).

Features:

Usage

Read an article about configuration management using cfg4j.

Detailed documentation

Head to the documentation.

Sample apps

Explore the code of the sample apps.

Quick start

Setting up dependency

Gradle

dependencies {
  compile group: "org.cfg4j", name:"cfg4j-core", version: "4.4.1"

  // For Consul integration
  compile group: "org.cfg4j", name:"cfg4j-consul", version: "4.4.1"

  // For git integration
  compile group: "org.cfg4j", name:"cfg4j-git", version: "4.4.1"
}

Maven

<dependencies>
  <dependency>
    <groupId>org.cfg4j</groupId>
    <artifactId>cfg4j-core</artifactId>
    <version>4.4.1</version>
  </dependency>
  <!-- For Consul integration -->
  <dependency> 
    <groupId>org.cfg4j</groupId>
    <artifactId>cfg4j-consul</artifactId>
    <version>4.4.1</version>
  </dependency>
  <!-- For git integration -->
  <dependency>
    <groupId>org.cfg4j</groupId>
    <artifactId>cfg4j-git</artifactId>
    <version>4.4.1</version>
  </dependency>
</dependencies>

Usage

The fastest way to start working with cfg4j is to use a Git repository as a configuration store. To do that follow the steps:

}



* Optional steps
    1. Fork the [configuration sample repository](https://github.com/cfg4j/cfg4j-git-sample-config).
    2. Add your configuration to the "*application.properties*" file and commit the changes.
    3. Update the code above to point to your fork.

# License
Licensed under the Apache License, Version 2.0. See LICENSE file.