com.sabre.oss.conf4j:conf4j-jmh

conf4j is a library that simplify configuration access via object to configuration mapping

Лицензия

Лицензия

Категории

Категории

JMH Тестирование приложения и мониторинг Performance analysis
Группа

Группа

com.sabre.oss.conf4j
Идентификатор

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

conf4j-jmh
Последняя версия

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

1.0.RC2
Дата

Дата

Тип

Тип

jar
Описание

Описание

conf4j is a library that simplify configuration access via object to configuration mapping
Организация-разработчик

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

Sabre GLBL Inc.

Скачать conf4j-jmh

Имя Файла Размер
conf4j-jmh-1.0.RC2.pom
conf4j-jmh-1.0.RC2.jar 2 KB
Обзор

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

<!-- https://jarcasting.com/artifacts/com.sabre.oss.conf4j/conf4j-jmh/ -->
<dependency>
    <groupId>com.sabre.oss.conf4j</groupId>
    <artifactId>conf4j-jmh</artifactId>
    <version>1.0.RC2</version>
</dependency>
// https://jarcasting.com/artifacts/com.sabre.oss.conf4j/conf4j-jmh/
implementation 'com.sabre.oss.conf4j:conf4j-jmh:1.0.RC2'
// https://jarcasting.com/artifacts/com.sabre.oss.conf4j/conf4j-jmh/
implementation ("com.sabre.oss.conf4j:conf4j-jmh:1.0.RC2")
'com.sabre.oss.conf4j:conf4j-jmh:jar:1.0.RC2'
<dependency org="com.sabre.oss.conf4j" name="conf4j-jmh" rev="1.0.RC2">
  <artifact name="conf4j-jmh" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.sabre.oss.conf4j', module='conf4j-jmh', version='1.0.RC2')
)
libraryDependencies += "com.sabre.oss.conf4j" % "conf4j-jmh" % "1.0.RC2"
[com.sabre.oss.conf4j/conf4j-jmh "1.0.RC2"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.sabre.oss.conf4j : conf4j-spring jar 1.0.RC2
com.sabre.oss.conf4j : conf4j-javassist jar 1.0.RC2

test (6)

Идентификатор библиотеки Тип Версия
org.junit.jupiter : junit-jupiter-api jar 5.0.2
org.apiguardian : apiguardian-api jar 1.0.0
org.openjdk.jmh : jmh-core jar 1.19
org.openjdk.jmh : jmh-generator-annprocess jar 1.19
org.apache.logging.log4j : log4j-core jar 2.8.2
org.apache.logging.log4j : log4j-slf4j-impl jar 2.8.2

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

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

Conf4j - Type-safe Configuration Library for Java

Build Status Maven Central

conf4j is a library which allows accessing configuration data in object-oriented, type-safe manner.

In conf4j configuration is represented as an interface or abstract class optionally annotated with conf4j annotations.

@Key("connection")
public interface ConnectionConfiguration {
   String getUrl();

   String getUser();

   String getPassword();

   @Default("60")
   int getConnectionTimeout();

   @Default("30")
   int getReadTimeout();
}

Then a configuration instance is created and bound to the value source by the configuration factory.

ConfigurationSource source = new PropertiesConfigurationSource("configuration.properties");
ConfigurationFactory factory = new JdkProxyStaticConfigurationFactory();
ConnectionConfiguration configuration = factory.createConfiguration(ConnectionConfiguration.class, source);

Once the configuration instance is created you can access the configuration values via getters:

String url =  configuration.getUrl();
int connectionTimeout = configuration.getConnectionTimeout();

Example configuration.properties is as follows:

connection.url=https://github.com/SabreOss/conf4j
connection.user=john
connection.password=secret
connection.connectionTimeout=45

For more information how to use conf4j please read Conf4j User's Guide and check conf4j-examples directory.

Contributing

We accept pull request via GitHub. Here are some guidelines which will make applying PRs easier for us:

  • No tabs. Please use spaces for indentation.
  • Respect the code style.
  • Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
  • Provide JUnit tests for your changes and make sure they don't break anything by running mvn clean verify.

See CONTRIBUTING document for more details.

License

Copyright 2017-2018 Sabre GLBL Inc.

Code is under the MIT license.

com.sabre.oss.conf4j

Sabre

Travel Inspired, Tech Obsessed

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

Версия
1.0.RC2
1.0.RC1
0.9
0.9.RC1