Skip to content

OWNER

Java™ properties reinvented. Declare an interface, annotate it, and stop writing code that loads, converts and manages configuration.

Put your settings in a properties file, exactly as you already do:

ServerConfig.properties
port=80
hostname=foobar.com
maxThreads=100

Declare an interface next to it, and let OWNER do the wiring:

ServerConfig.java
import org.aeonbits.owner.Config;
public interface ServerConfig extends Config {
int port();
String hostname();
@DefaultValue("42")
int maxThreads();
}

Then read your configuration as typed values, with no loading code at all:

ServerConfig cfg = ConfigFactory.create(ServerConfig.class);
System.out.println("Running on " + cfg.hostname() + ":" + cfg.port());

That is the whole thing. No Properties object to load, no getProperty() call to spell out, no string to parse into an int.

Simple

No more code to load, convert and manage properties files — just use your properties in the simplest possible way.

See how OWNER works →

Powerful

Annotation based, automatic type conversion, variables expansion, loading strategies, hot reload, event notifications, and much more.

See the features list →

Flexible

Pick the features you need and forget the ones you don’t. Easy to adopt, scales with complexity, fully documented.

Why should I use OWNER? →

Project maintained by Matteo Baccan, and the awesome contributors.

Developed with IntelliJ IDEA

Hosted on GitHub