public class SubstitutingSourceProvider extends Object implements ConfigurationSourceProvider
ConfigurationSourceProvider which replaces variables in the underlying configuration
source according to the rules of a custom StringSubstitutor.| Constructor and Description |
|---|
SubstitutingSourceProvider(ConfigurationSourceProvider delegate,
org.apache.commons.text.StringSubstitutor 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.text.StringSubstitutor substitutor)
delegate - The underlying ConfigurationSourceProvider.substitutor - The custom StringSubstitutor 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 © 2020. All rights reserved.