br.com.ingenieux.dropwizard:dropwizard-envvar

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Categories

Categories

DropWizard Container Microservices
GroupId

GroupId

br.com.ingenieux.dropwizard
ArtifactId

ArtifactId

dropwizard-envvar
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Source Code Management

Source Code Management

http://github.com/ingenieux/dropwizard-envvar

Download dropwizard-envvar

How to add to project

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

Dependencies

provided (1)

Group / Artifact Type Version
io.dropwizard : dropwizard-core jar 0.7.1

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Interpolates environment variables in Dropwizard YAML configurations.

Usage

In your Application class

public void initialize( Bootstrap bootstrap ) {
	bootstrap.addBundle( new EnvironmentVariableInterpolationBundle() );

In your YAML configuration

# This is just an example
mongo:
  host: ${MONGO_HOST}
  port: ${MONGO_PORT}

Notes

This bundle will fail fast, i.e. if an environment variable is not found, it will throw an EnvironmentException:

EnvironmentException: The environment variable 'MONGO_HOST' is not defined; could not substitute the expression '${MONGO_HOST}'.
br.com.ingenieux.dropwizard

ingenieux Brasil

Versions

Version
0.0.1