[
https://issues.apache.org/jira/browse/CONFIGURATION-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oliver Heger resolved CONFIGURATION-447.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.7
The feature was added in subversion in revision 1095800. Many thanks for the
proposal!
> DefaultConfigurationBuilder should provide default provider for environment
> variables
> -------------------------------------------------------------------------------------
>
> Key: CONFIGURATION-447
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-447
> Project: Commons Configuration
> Issue Type: Improvement
> Affects Versions: 1.6
> Reporter: Fabien Nisol
> Priority: Trivial
> Fix For: 1.7
>
>
> DefaultConfigurationBuilder does not provide a way to merge environment
> variable into the configuration
> eg:
> {code}
> <configuration>
> <env/>
> ...
> </configuration>
> {code}
> I think this could be implemented by adding the following code into the
> DefaultConfigurationBuilder class
> {code:title=DefaultConfigurationBuilder.java}
> //Constant for the provider for environment variables.
> private static final ConfigurationProvider ENV_PROVIDER = new
> ConfigurationProvider(
> EnvironmentConfiguration.class);
> //An array with the names of the default tags.
> private static final String[] DEFAULT_TAGS =
> {"properties", "xml", "hierarchicalXml", "jndi", "system", "plist",
> "configuration","env"};
>
> //An array with the providers for the default tags.
>
> private static final ConfigurationProvider[] DEFAULT_PROVIDERS =
> {PROPERTIES_PROVIDER, XML_PROVIDER, XML_PROVIDER, JNDI_PROVIDER,
> SYSTEM_PROVIDER, PLIST_PROVIDER, BUILDER_PROVIDER,ENV_PROVIDER};
> {code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira