我运行下面的 Java Camel 路由从 FTP 服务器下载新文件,但似乎不起作用。但是,它也没有显示任何错误。该应用程序以状态启动
Routes startup summary (total:1 started:1)
[2] 2021-07-22 07:03:45,885 INFO [org.apa.cam.imp.eng.AbstractCamelContext] (main) Started route1 (ftp://user1@ftp.mycompany.com/customer-1)
FTP 路由代码
// camel-k: language=java
import org.apache.camel.builder.RouteBuilder;
public class FTPDownloader extends RouteBuilder {
@Override
public void configure() throws Exception {
from("ftp://user1@ftp.mycompany.com/customer-1?password=RAW(Password)&delay=5s&delete=true")
.to("file:///tmp/data").log("downloaded");
}
}
注意:我已经在本地 Kind 集群中设置了 Camel K。
$ kamel run FTPDownloader.java --dev