【发布时间】:2020-11-10 09:24:26
【问题描述】:
您好,我如何在使用文件后从 SFTP 中删除源文件。下面是我的配置。它正确地使用文件并处理它。但在下一次民意调查中,它的读数再次相同。我喜欢删除源文件或避免再次读取相同的文件。我使用的是 4.3.13
<int-sftp:inbound-streaming-channel-adapter id="sftpAdapter"
session-factory="sftpSessionFactory"
filename-pattern="*.xml"
channel="receiveChannel"
remote-directory="/tmp/charge/">
</int-sftp:inbound-streaming-channel-adapter>
<int:poller fixed-rate="30000" max-messages-per-poll="1" id="ChargePoller"/>
<int:channel id="receiveChannel">
<int:queue/>
</int:channel>
<int:stream-transformer id="withCharset" charset="UTF-8" input-channel="receiveChannel" output-channel="fileInString" />
<int:service-activator id="ChargeFeedListener" input-channel="fileInString" method="onMessage" >
<bean class="listener.ChargeFeedListener">
<constructor-arg name="ChargeService" ref="ChargeService"/>
</bean>
</int:service-activator>
【问题讨论】:
标签: java spring spring-integration sftp