[
https://issues.apache.org/jira/browse/CONFIGURATION-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16502410#comment-16502410
]
Oliver Heger commented on CONFIGURATION-704:
--------------------------------------------
I see. Well, I am not too excited about the include mechanism for properties
files because it is a special implementation for {{PropertiesConfiguration}}
and is normally less powerful than combined configurations. Therefore, I am a
bit reluctant to adding new features in this area.
You make a valid point that it is easier to use the include mechanism in a
dynamic way. In theory you can achieve the same with combined configurations by
constructing the XML definition the combined configuration is based on
manually. But this is admittedly cumbersome. I would like to simplify this by
adding a kind of builder that allows creating such definitions using a
convenient API. This could also support use cases like _add all configuration
sources located in the /conf director_y. Would this be an option?
That said, if you want to provide a patch for the include mechanism and the
required changes are not too complex, I am happy to review it.
> an option to override property key instead of creation of lists
> ---------------------------------------------------------------
>
> Key: CONFIGURATION-704
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-704
> Project: Commons Configuration
> Issue Type: New Feature
> Affects Versions: 2.2
> Reporter: Dan Alon
> Priority: Major
>
> Hi,
>
> I want an option when loading a properties file from the include
> functionality (or in the same file) to disable the list feature that when
> entering the same key it creates a list instead of override the old value.
> for example when entering these properties:
> colors.pie = #FF0000
> colors.pie = #00FF00
> colors.pie = #0000FF
> instead of creating a string with seperator like this colors.pie
> =#FF0000,#00FF00,#0000FF
>
> i want only the last value colors.pie = #0000FF
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)