gpt4 book ai didi

java - Camel : how to skip folders during initial upload?

转载 作者:行者123 更新时间:2023-11-30 06:53:06 24 4
gpt4 key购买 nike

我有 Camel 路线,如下所示:

 from("sftp://....."+ 
"&throwExceptionOnConnectFailed=true" +
"&consumer.delay=10000" +
"&recursive=true" +
"&antInclude=*/*.xml" +
"&idempotent=true" +
"&scheduler=quartz2&scheduler.cron="+ env.getProperty("camel.scheduler.cron")+""+
"&filterDirectory=${date:now:yyyyMMdd}").

当我启动应用程序时,Camel 从 FTP 获取所有文件夹,但我只需要 20170221(当前日期,采用 yyyyMMdd 格式)。

所以问题是:如何只上传当前日期文件夹?

最佳答案

不要使用 filterDirectory,而是尝试使用 antInclude,如下所示:"antInclude=${date:now:yyyyMMdd}/*.xml"

关于java - Camel : how to skip folders during initial upload?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42368126/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com