Class ConfigurationSubstitutionBundle
java.lang.Object
org.sdase.commons.server.dropwizard.bundles.ConfigurationSubstitutionBundle
- All Implemented Interfaces:
io.dropwizard.core.ConfiguredBundle<io.dropwizard.core.Configuration>
public class ConfigurationSubstitutionBundle
extends Object
implements io.dropwizard.core.ConfiguredBundle<io.dropwizard.core.Configuration>
The
ConfigurationSubstitutionBundle
allows to use placeholders for environment variables
or system properties in configuration yaml files. It should be added as first bundle in the
application.
The config.yaml
may contain placeholders that are replaced by the content of
environment variables or system properties and optional default values:
server:
rootPath: ${ROOT_PATH:/api/*}
Nested placeholders are supported:
example: ${EXAMPLE_VALUE:-bar-${EXAMPLE_SUFFIX}}
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
void
initialize
(io.dropwizard.core.setup.Bootstrap<?> bootstrap) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.dropwizard.core.ConfiguredBundle
run
-
Constructor Details
-
ConfigurationSubstitutionBundle
public ConfigurationSubstitutionBundle()
-
-
Method Details
-
builder
-
initialize
public void initialize(io.dropwizard.core.setup.Bootstrap<?> bootstrap) - Specified by:
initialize
in interfaceio.dropwizard.core.ConfiguredBundle<io.dropwizard.core.Configuration>
-