【发布时间】:2017-07-11 12:55:21
【问题描述】:
我可以将本地目录中的文件 Document.txt 发送到远程目录,但是如果我在远程删除文件并尝试再次从本地发送,则无法通过 FTP 传输相同的文件。轮询器工作正常,因为如果我将不同的文件放在同一个文件夹中,它就会启动。我可以对此有所了解吗?
enter code here
<!-- Inbound adapter channels for reading the local directory files in processed folder -->
<file:inbound-channel-adapter id="inboundProcessed"
channel="processedChannel"
filename-pattern="*.txt"
directory="$dina-communication.batch-{localDirectory}"
>
<int:poller fixed-rate="10000" />
</file:inbound-channel-adapter>
<int:channel id="processedChannel"></int:channel>
<!-- Outbound adapter channels for FTP the files in processed folder to remote directory -->
<int-ftp:outbound-channel-adapter id="ftpProcessed"
channel="processedChannel"
session-factory="ftpClientFactory"
remote-directory="$dina-communication.batch-{remoteDirectory}"
>
<int-ftp:request-handler-advice-chain>
<bean class="org.springframework.integration.handler.advice.ExpressionEvaluatingRequestHandlerAdvice">
<property name="onSuccessExpression" value="payload.delete()" />
</bean>
</int-ftp:request-handler-advice-chain>
</int-ftp:outbound-channel-adapter>
【问题讨论】:
-
欢迎来到 SO!请查看以下内容并根据以下内容更新您的问题:stackoverflow.com/help/how-to-ask