Apache camel 具有当前日期的Apache camel文件名
是否可以提供动态文件名,其中包含骆驼文件目标端点中的日期 我的申请表中有以下内容。yamlApache camel 具有当前日期的Apache camel文件名,apache-camel,Apache Camel,是否可以提供动态文件名,其中包含骆驼文件目标端点中的日期 我的申请表中有以下内容。yaml destination-end-point-file: file:/H:/temp?fileName=${date:now:yyyyMMdd} 这是抛出下面的异常 java.nio.file.InvalidPathException: Illegal char <:> at index 11: H:\temp\now:yyyyMMdd 我想有如下输出的东西 一些文件名为20190717.
destination-end-point-file: file:/H:/temp?fileName=${date:now:yyyyMMdd}
这是抛出下面的异常
java.nio.file.InvalidPathException: Illegal char <:> at index 11: H:\temp\now:yyyyMMdd
我想有如下输出的东西
一些文件名为20190717.csv
如何使camel计算表达式${date:now:yyyyMMdd}我可以通过在java路由中添加表达式来实现它,但不确定它在读取spring属性文件时为什么不计算表达式 在Java路由中
.to("{{tp.position.destination-end-point-file}}" + "?fileName=ps_open_txn_batch_${date:now:yyyyMMdd}.csv")
在应用程序中.yaml
destination-end-point-file: file:/H:/temp
您可以更新属性文件中的某些内容,例如:
tp.position.destination-end-point-file=file:/output/location?
fileName=ps_open_txn_batch_$simple{date:now:yyyyMMdd}.csv