camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Dot notation for spring DSL properties fails for spring DSL route value
Date Wed, 06 Aug 2014 06:25:36 GMT
Hi

Are you sure its Camel and not spring ?

Camel uses {{ }} syntax, and Spring ${ }.
So it sounds like you are using a spring property placeholder

http://camel.apache.org/using-propertyplaceholder.html

On Tue, Aug 5, 2014 at 11:54 PM, heregear <eric@heregear.com> wrote:
> Configuration:  JDK8, Camel 2.13, Spring, Spring property placeholder, text
> properties file
>
> Background:  in order to create a dynamic URI for a route with a spring
> property, it’s required that you create an endpoint declaration, then refer
> to it:
> End point declaration:
> <endpoint id="camelMongoURI"
> uri="mongodb:myDb?database=${mongo_primary_db_name}&amp;collection=mycollection&amp;operation=insert"/>
>
> Then refer to that in the URI property of your route, to allow it to be
> dynamic to the spring prop above:
> <to uri="ref:camelMongoURI"/>
>
> The bug:  if you use dot notation as the naming convention of a property,
> similar to mongo.primary.db.name=test, it fails, camel will return null on
> that property
>
> If, however, you use a non-dot-notated name for your property name, camel
> picks up the property value, like so:  mongo_primary_db_name=test
>
> Dot notation elsewhere in camel works fine, we consider this a bug.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Dot-notation-for-spring-DSL-properties-fails-for-spring-DSL-route-value-tp5754821.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message