OWNER :: Java 8 Support

OWNER Parent Project

Лицензия

Лицензия

Категории

Категории

Java 8 Языки программирования owner Библиотеки уровня приложения Configuration
Группа

Группа

org.aeonbits.owner
Идентификатор

Идентификатор

owner-java8
Последняя версия

Последняя версия

1.0.12
Дата

Дата

Тип

Тип

jar
Описание

Описание

OWNER :: Java 8 Support
OWNER Parent Project
Организация-разработчик

Организация-разработчик

Luigi R. Viggiano
Система контроля версий

Система контроля версий

https://github.com/lviggiano/owner/tree/master/owner-java8

Скачать owner-java8

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.aeonbits.owner/owner-java8/ -->
<dependency>
    <groupId>org.aeonbits.owner</groupId>
    <artifactId>owner-java8</artifactId>
    <version>1.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.aeonbits.owner/owner-java8/
implementation 'org.aeonbits.owner:owner-java8:1.0.12'
// https://jarcasting.com/artifacts/org.aeonbits.owner/owner-java8/
implementation ("org.aeonbits.owner:owner-java8:1.0.12")
'org.aeonbits.owner:owner-java8:jar:1.0.12'
<dependency org="org.aeonbits.owner" name="owner-java8" rev="1.0.12">
  <artifact name="owner-java8" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.aeonbits.owner', module='owner-java8', version='1.0.12')
)
libraryDependencies += "org.aeonbits.owner" % "owner-java8" % "1.0.12"
[org.aeonbits.owner/owner-java8 "1.0.12"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.aeonbits.owner : owner jar 1.0.12

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

OWNER

OWNER, an API to ease Java property files usage.

Build Status Coverage Status security status stability status Built with Maven

DONATIONS

Your support, is the acknowledgment of the value of this work and helps it running and improving. Donations are welcome.

Donate bitcoin:1DARNDYjjKhNF8j2DFwT3zrtUsMQvV2am1
bitcoin:1DARNDYjjKhNF8j2DFwT3zrtUsMQvV2am1

Donate with PayPal

Thank you!

INTRODUCTION

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.

BASIC USAGE

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();
    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.

DOWNLOAD

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

DOCUMENTATION

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.

LICENSE

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

Версии библиотеки

Версия
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6