【发布时间】:2015-12-02 15:52:27
【问题描述】:
我想将文件从远程服务器拉到我的本地。我正在使用 Spring Integration SFTP 来提取文件。我有以下配置:
<sftp:inbound-channel-adapter id="sftpAdapterAutoCreate"
session-factory="sftpSessionFactory" channel="inputChannel"
filename-pattern="*.txt" remote-directory="/remotedir"
local-directory="file:target/foo" auto-create-local-directory="true"
delete-remote-files="false" >
<int:poller fixed-rate="30000" />
</sftp:inbound-channel-adapter>
我不想在成功拉取后从 remotedir 中删除文件。这里发生的是每 30 秒,来自 remotedir 的文件被拉到我的本地。我希望 spring 批处理程序在第一次之后停止并且不再拉同一个文件。 我怎样才能做到这一点?
【问题讨论】:
标签: spring-integration spring-batch sftp