Class ConsulSubstitutor
- java.lang.Object
-
- org.apache.commons.text.StringSubstitutor
-
- io.dropwizard.configuration.EnvironmentVariableSubstitutor
-
- org.kiwiproject.dropwizard.consul.config.ConsulSubstitutor
-
public class ConsulSubstitutor extends io.dropwizard.configuration.EnvironmentVariableSubstitutor
A customEnvironmentVariableSubstitutor
using Consul KV as lookup source.
-
-
Constructor Summary
Constructors Constructor Description ConsulSubstitutor(com.orbitz.consul.Consul consul)
ConsulSubstitutor(com.orbitz.consul.Consul consul, boolean strict)
ConsulSubstitutor(com.orbitz.consul.Consul consul, boolean strict, boolean substitutionInVariables)
Constructor
-
Method Summary
-
Methods inherited from class org.apache.commons.text.StringSubstitutor
createInterpolator, getEscapeChar, getStringLookup, getValueDelimiterMatcher, getVariablePrefixMatcher, getVariableSuffixMatcher, isDisableSubstitutionInValues, isEnableSubstitutionInVariables, isEnableUndefinedVariableException, isPreserveEscapes, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replaceIn, replaceIn, replaceIn, replaceIn, replaceIn, replaceIn, replaceSystemProperties, resolveVariable, setDisableSubstitutionInValues, setEnableSubstitutionInVariables, setEnableUndefinedVariableException, setEscapeChar, setPreserveEscapes, setValueDelimiter, setValueDelimiter, setValueDelimiterMatcher, setVariablePrefix, setVariablePrefix, setVariablePrefixMatcher, setVariableResolver, setVariableSuffix, setVariableSuffix, setVariableSuffixMatcher
-
-
-
-
Constructor Detail
-
ConsulSubstitutor
public ConsulSubstitutor(com.orbitz.consul.Consul consul)
-
ConsulSubstitutor
public ConsulSubstitutor(com.orbitz.consul.Consul consul, boolean strict)
-
ConsulSubstitutor
public ConsulSubstitutor(com.orbitz.consul.Consul consul, boolean strict, boolean substitutionInVariables)
Constructor- Parameters:
consul
- Consul clientstrict
-true
if looking up undefined environment variables should throw aUndefinedEnvironmentVariableException
,false
otherwise.substitutionInVariables
- a flag whether substitution is done in variable names.- See Also:
StringSubstitutor.setEnableSubstitutionInVariables(boolean)
-
-