public class SubstitutingSourceProvider extends Object implements ConfigurationSourceProvider
ConfigurationSourceProvider which replaces variables in the underlying configuration
source according to the rules of a custom StrSubstitutor.| Constructor and Description |
|---|
SubstitutingSourceProvider(ConfigurationSourceProvider delegate,
org.apache.commons.lang3.text.StrSubstitutor substitutor)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
open(String path)
Returns an
InputStream that contains the source of the configuration for the
application. |
public SubstitutingSourceProvider(ConfigurationSourceProvider delegate, org.apache.commons.lang3.text.StrSubstitutor substitutor)
delegate - The underlying ConfigurationSourceProvider.substitutor - The custom StrSubstitutor implementation.public InputStream open(String path) throws IOException
InputStream that contains the source of the configuration for the
application. The caller is responsible for closing the result.open in interface ConfigurationSourceProviderpath - the path to the configurationInputStreamIOException - if there is an error reading the data at pathCopyright © 2015. All rights reserved.