Hello Hans,
Am 17.01.2014 10:48, schrieb Hans Schwäbli:
> When using the org.apache.commons.configuration.PropertiesConfiguration
> there is a "include" feature allowing me to include other property files.
>
> I use this for overriding default properties with user's specific
> properties: include=configuration_${sys:user.name}.cfg
>
> Now I want to use org.apache.commons.configuration.INIConfiguration in
> another project because then I can use sections. But there seems to be no
> include feature when using that INIConfiguration.
>
> Do I have to code that feature myself when using the INIConfiguration or
> did I overlook how it works?
>
There is indeed no support for includes in INIConfiguration. The
recommended way for combining the data of multiple configuration sources
is to use the DefaultConfigurationBuilder [1] class. It allows you to
construct a hierarchical configuration from child configurations of
different types.
HTH
Oliver
[1]
http://commons.apache.org/proper/commons-configuration/userguide/howto_configurationbuilder.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]