My guess is that something like this should work:

    <setHeader headerName="myHeader">
            <simple>${properties:key}</simple>
    </setHeader>


Bilgin

On 18 January 2012 09:34, Christoph Burmeister
<chburmeis...@googlemail.com> wrote:
> hi,
>
> how can I set a header with a value from a properties-file using
> spring-xml?
> Doing this with the const-tag is no problem, but then the value has to be
> directly written in the camel.xml:
>
> <setHeader>
>   <const>foobar</const>
> </setHeader>
>
> I like to use something like this:
>
> environment.properties:
> -----------------------------
> header.value=foobar
>
> camel.xml
> ---------------
> <beans>
>   <bean id="placeholderConfig"
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>        <property name="locations">
>            <list>
>                <value>environment.properties</value>
>                <value>another-file.properties</value>
>            </list>
>        </property>
>    </bean>
>
>
>    <route>
>     ...
>         <setHeader>
>                 ${header.value}
>         </setHeader>
>      ...
>    </route>
> </beans>
>
> Is there a solution for camel 2.7 ?
>
> best,
> christoph

Reply via email to