Ftp Spring集成-无法再次发送同名文件
我可以将本地目录中的Document.txt文件发送到远程目录,但如果我删除远程目录中的文件并再次尝试从本地发送,则无法通过FTP将同一文件发送到远程目录。Poller工作正常,因为如果我将不同的文件放在同一文件夹中,它会自动接收。我可以对此有一些了解吗Ftp Spring集成-无法再次发送同名文件,ftp,spring-integration,Ftp,Spring Integration,我可以将本地目录中的Document.txt文件发送到远程目录,但如果我删除远程目录中的文件并再次尝试从本地发送,则无法通过FTP将同一文件发送到远程目录。Poller工作正常,因为如果我将不同的文件放在同一文件夹中,它会自动接收。我可以对此有一些了解吗 enter code here <!-- Inbound adapter channels for reading the local directory files in processed folder --&
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!请检查以下内容,并根据以下内容更新您的问题:当然,我将尝试并保持联系!!实际上,我尝试使用创建另一个FTP客户端工厂进行出站,它解决了这个问题,因为项目中有很多FTP'e会话,所以我尝试了这种方法。
/**
* Computes a hash code for this abstract pathname. Because equality of
* abstract pathnames is inherently system-dependent, so is the computation
* of their hash codes. On UNIX systems, the hash code of an abstract
* pathname is equal to the exclusive <em>or</em> of the hash code
* of its pathname string and the decimal value
* <code>1234321</code>. On Microsoft Windows systems, the hash
* code is equal to the exclusive <em>or</em> of the hash code of
* its pathname string converted to lower case and the decimal
* value <code>1234321</code>. Locale is not taken into account on
* lowercasing the pathname string.
*
* @return A hash code for this abstract pathname
*/
public int hashCode() {
return fs.hashCode(this);
}