Skip navigation links

Package org.aeonbits.owner

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

See: Description

Package org.aeonbits.owner Description

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

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

Suppose your properties file is defined as ServerConfig.properties:
  port=80
  hostname=foobar.com
  maxThreads=100
  
To access this property you need to define a convenient Java interface in ServerConfig.java:
  public interface ServerConfig extends Config {
      int port();
      String hostname();

      @DefaultValue("42");
      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.

Owner has a lot of features and its behavior is fully customizable to your needs.

Have a look at the full documentation from the OWNER website.

Skip navigation links

Copyright © 2012-2015 Luigi R. Viggiano. All Rights Reserved.