Hi,

I am wondering whether it is possible to use a ${date:now:yyyyMMdd} on an
endpoint in my camel context file, in order to specify a date-related
endpoint (my endpoint will change everyday according to date).

I tried something such as : 
    <endpoint id="com.my.dir.out"
uri="file:${com.my.params.dir.out}/${date:now:yyyyMMdd}?autoCreate=true" />

but this didn't work : the first parameter "/com.my.params.dir.out/" was
parsed, but the date was instead replaced by "now:yyyyMMdd" (I also tried
something stupid such as : ${date:${date:now:yyyyMMdd}}, but this lead to
same result, indeed...):

/C​a​n​n​o​t​ ​p​o​l​l​ ​a​s​ ​d​i​r​e​c​t​o​r​y​ ​d​o​e​s​ ​n​o​t​
​e​x​i​s​t​s​ ​o​r​ ​i​t​s​ ​n​o​t​ ​a​ ​d​i​r​e​c​t​o​r​y​:​
​d​:​\​t​m​p​\​c​a​m​e​l​\out\​n​o​w​:​y​y​y​y​M​M​d​d/

Is there anyway to use the date that way in context-file?

For information, my route are defined in a RouteBuilder class, and not in
the camel-context file.

Thanks in advance!



--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-date-placeholder-in-camel-context-endpoint-tp5736295.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to