Configuration Properties

A set of objects for accessing configuration

License

License

Categories

Categories

config Application Layer Libs Configuration
GroupId

GroupId

com.github.skapral.config
ArtifactId

ArtifactId

config-properties
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Configuration Properties
A set of objects for accessing configuration
Project URL

Project URL

https://github.com/skapral/configproperties
Source Code Management

Source Code Management

https://github.com/skapral/configproperties.git

Download config-properties

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
io.vavr : vavr jar 0.10.2
org.assertj : assertj-core jar 3.14.0
com.pragmaticobjects.oo.tests : tests-junit5 jar 0.0.0
com.pragmaticobjects.oo.equivalence : equivalence-base jar 0.0.1

Project Modules

There are no modules declared in this project.

Configuration properties

Build Status (Travis) Build status (AppVeyor) Codecov

A set of simple objects for reading configuration

Quick start

Add Maven dependency

<dependency>
    <groupId>com.github.skapral.config</groupId>
    <artifactId>config-properties</artifactId>
    <version>x.y.z</version>
</dependency>

Examples

  1. Hardcoded HTTP port:
ConfigProperty port = new CpStatic(
    "8080"
);
  1. HTTP port, read from PORT environment value:
ConfigProperty port = new CpEnvironment(
    "PORT"
);
  1. HTTP port, read from PORT environment variable (default 5000 if there is no environment variable):
ConfigProperty port = new CpOneOf(
    new CpEnvironment(
        "PORT"
    ),
    new CpStatic(
        "8080"
    )
);

Versions

Version
0.0.2
0.0.1
0.0.0