startup-parameters 1.0-7

Read system parameters and environment variable

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

com.payneteasy
Идентификатор

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

startup-parameters
Последняя версия

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

1.0-7
Дата

Дата

Тип

Тип

jar
Описание

Описание

startup-parameters 1.0-7
Read system parameters and environment variable
Ссылка на сайт

Ссылка на сайт

https://github.com/payneteasy/startup-parameters
Система контроля версий

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

https://github.com/payneteasy/startup-parameters

Скачать startup-parameters

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

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

Зависимости

test (1)

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

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

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

Maven Central CircleCI Quality Gate Status

Parse startup parameters

Features

  • supported types: int, String, File, boolean
  • thread safe
  • small library size, dependencies only on slf4j-api for logging

Setup with dependency managers

Maven

<dependency>
  <groupId>com.payneteasy</groupId>
  <artifactId>startup-parameters</artifactId>
  <version>1.0-6</version>
</dependency>

Gradle

compile 'com.payneteasy:startup-parameters:1.0-6'

How to use

❶ Create an interface with parameters, see example

public interface IStartupConfig {

    @AStartupParameter(name = "WEB_SERVER_PORT", value = "8083")
    int webServerPort();

    @AStartupParameter(name = "WEB_SERVER_CONTEXT", value = "/api")
    String webServerContext();

    @AStartupParameter(name = "REQUEST_LOG_DIR", value = "./logs")
    File getRequestLogDir();
}

❷ Create an instance, see example

    IStartupConfig startupConfig = StartupParametersFactory.getStartupParameters(IStartupConfig.class);
    int port = startupConfig.webServerPort();

License

The Startup Parameters library is licensed under the Apache License 2.0

com.payneteasy

Payneteasy

Payment Platform Provider

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

Версия
1.0-7
1.0-6
1.0-5
1.0-4
1.0-3