【发布时间】:2015-05-22 14:25:12
【问题描述】:
我们正在使用 spring 集成 sftp:inbound-channel-adapter 从远程主机传输数据。我们希望将文件保留在远程主机上。因此我们尝试了 delete-remote-files=false 选项。
<int-sftp:inbound-channel-adapter
id="sftpInboundChannelAdapter"
channel="filesToParse"
session-factory="..."
remote-directory="..."
filename-pattern="..."
local-directory="..."
temporary-file-suffix=".tmp"
delete-remote-files="false"
auto-create-local-directory="true" local-filter="localFileFilter"
>
不幸的是,这些文件随后会被处理多次。有没有办法保留远程文件而不是多次处理它们?
编辑:这是因为后续进程会在本地删除文件。
<bean id="localFileFilter" class="org.springframework.integration.file.filters.AcceptAllFileListFilter"/>
【问题讨论】:
标签: java spring spring-integration