我有一个容器内的弹簧启动应用程序,我用骆驼来读取一些文件,但我需要告诉骆驼开始读取容器外,然后将相同的文件移动到一个这也是在容器外具体路径,有人可以帮我?骆驼 - 如何移动码头集装箱外的文件
这是我的代码:
@Component
public class Controlador extends RouteBuilder {
@Autowired
Procesador objProcesador;
@Override
public void configure() throws Exception {
from("ftp://[email protected]:port?password=password&passiveMode=true&delete=true").streamCaching().convertBodyTo(InputStream.class).process(objProcesador).to("/var/lib");
}
}
在此先感谢
使用[移动](http://camel.apache.org/file2.html)URI选项而不是删除。 https://stackoverflow.com/questions/19905462/how-to-rename-and-move-the-file-on-ftp-once-processed-by-camel – Bedla
是的,这将移动该文件,但我怎么能指定一个在容器外面的路径? –
不确定你对“容器外”意味着什么。如果这意味着在远程FTP服务器上移动文件,那么从camel-file2组件继承的“move”选项应该可以工作 – Bedla