startup-parameters 1.0-7

Read system parameters and environment variable

License

License

Categories

Categories

Net
GroupId

GroupId

com.payneteasy
ArtifactId

ArtifactId

startup-parameters
Last Version

Last Version

1.0-7
Release Date

Release Date

Type

Type

jar
Description

Description

startup-parameters 1.0-7
Read system parameters and environment variable
Project URL

Project URL

https://github.com/payneteasy/startup-parameters
Source Code Management

Source Code Management

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

Download startup-parameters

How to add to project

<!-- 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"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0-7
1.0-6
1.0-5
1.0-4
1.0-3