简体   繁体   English

骆驼路由多个文件

[英]Camel route multiple files

How does one pass multiple files through a pojo that fetches them and then to a file component, and to a ftp in one route? 如何将多个文件通过pojo传递,然后再通过一条路径将它们传递到文件组件和ftp? I've been trying to use a Map but not to sure what the body should have for key name, what should GetFiles do to pass on multiple files in below example? 我一直在尝试使用Map,但是不能确定键名的主体,在下面的示例中,GetFiles应该如何传递多个文件? If a map should be returned what keys should that map hold? 如果应返回地图,该地图应持有哪些键?

from("mock:start")
    .to(GetFiles.class)
    .to("file:transfer/outbound")
    .to("sftp:{{sftp_uri}}");

Why not just drop the files into a folder, have one route without any Java? 为什么不将文件放到文件夹中,只有一条路线却没有Java?

from("file:///inbound").multicast().to("file:outbound/", "sftp://"); from(“ file:/// inbound”).multicast()。to(“ file:outbound /”,“ sftp://”);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM