Get rid of the boilerplate code in properties based configuration.
Java CSS HTML Shell
Latest commit a93b147 Feb 11, 2017 @lviggiano committed on GitHub Merge pull request #196 from StFS/184-fix-unit-tests
184 fix unit tests


OWNER, an API to ease Java property files usage.

Build Status Coverage Status Built with Maven


Flattr this

Donate bitcoin:1DARNDYjjKhNF8j2DFwT3zrtUsMQvV2am1

Donate with PayPal


The goal of OWNER API is to minimize the code required to handle application configuration through Java properties files.

Full documentation available on project website.


The approach used by OWNER APIs, is to define a Java interface associated to a properties file.

Suppose your properties file is defined as


To access this property you need to define a convenient Java interface in

public interface ServerConfig extends Config {
    int port();
    String hostname();
    int maxThreads();

We'll call this interface the Properties Mapping Interface or just Mapping Interface since its goal is to map Properties into a an easy to use piece of code.

Then, you can use it from inside your code:

public class MyApp {
    public static void main(String[] args) {
        ServerConfig cfg = ConfigFactory.create(ServerConfig.class);
        System.out.println("Server " + cfg.hostname() + ":" + cfg.port() +
                           " will run " + cfg.maxThreads());

But this is just the tip of the iceberg.

Continue reading here: Basic usage.


Public Releases can be downloaded from GitHub Releases page or Maven Central Repository.


Make sure to have a look at the documentation on project website to learn how flexible and powerful OWNER is, and why you may need it!

Chinese documentation is provided by Yunfeng Cheng via a GitHub independent project at this address.


OWNER is released under the BSD license. See LICENSE file included for the details.