[ 
https://issues.apache.org/jira/browse/CAMEL-24532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Omar Atie reassigned CAMEL-24532:
---------------------------------

    Assignee: Omar Atie

> Camel Spring Boot: Preserve property-source precedence during early vault 
> resolution
> ------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24532
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24532
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Federico Mariani
>            Assignee: Omar Atie
>            Priority: Major
>
> *Problem*
> The early-resolution listeners iterate Spring {{PropertySources}} in 
> precedence order (highest first) and collect resolved values in one flat 
> {{Properties}} object. When the same key is a matching placeholder in more 
> than one source, each subsequent write replaces the previous value. The 
> resulting property source is then added with {{addFirst}}, so the value 
> originally taken from the lowest-precedence matching source wins.
> *Reproduction*
> Define the same property as an early-resolved placeholder in 
> {{application.properties}} and in a higher-precedence profile-specific source 
> such as {{application-prod.properties}}. With early resolution enabled, the 
> parser resolves both entries but the resolved value from 
> {{application.properties}} becomes effective, instead of the profile-specific 
> value.
> *Expected behaviour*
> Early resolution must preserve Spring's normal precedence: the 
> highest-precedence matching property source supplies the effective resolved 
> value.
> *Suggested direction*
> Process sources in reverse when populating the flat override map, or 
> otherwise retain the first value seen while iterating in precedence order. 
> Add a regression test that covers duplicate keys across property sources.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to