【发布时间】:2020-09-22 20:29:52
【问题描述】:
多年来,我一直在使用 Spring-Integration 4.1.6 连接到旧的 FTP 服务器。 FTP 服务器最近被更新的版本取代(新服务器是 Globalscape EFT Enterprise),我的 int-ftp 入站通道适配器立即停止查找文件。我监控了几个帐户,它们都同时停止工作。
这里是一个的配置:
<beans:bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<beans:property name="host" value="${ftp.host}" />
<beans:property name="port" value="${ftp.port}" />
<beans:property name="username" value="${ftp.username}" />
<beans:property name="password" value="${ftp.password}" />
<beans:property name="clientMode" value="2" />
<beans:property name="fileType" value="2" />
<beans:property name="bufferSize" value="5000000" />
</beans:bean>
<beans:bean id="cachingSessionFactory" class="org.springframework.integration.file.remote.session.CachingSessionFactory">
<beans:constructor-arg ref="ftpSessionFactory" />
<beans:constructor-arg value="1" />
<beans:property name="sessionWaitTimeout" value="60000" />
</beans:bean>
<int-ftp:inbound-channel-adapter id="ftpInboundChannelAdapter" channel="ftpChannelIn" session-factory="cachingSessionFactory" auto-create-local-directory="true"
delete-remote-files="true" remote-directory="dev" local-directory="C:/temp" auto-startup="true">
<poller max-messages-per-poll="-1" receive-timeout="10000" cron="0 0/2 * * * *" >
<transactional/>
</poller>
</int-ftp:inbound-channel-adapter>
当我调试适配器时,我看到了这个语句:
[org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer] cannot copy, not a file: dev/dev
但dev下没有名为dev的文件夹,只有一个.csv文件。
结构为 /path/to/user/dev/file.csv,FTP 服务器配置为在用户执行 PWD 时向用户显示完整路径。
而且我确信当登录发生时,它们被放置在 /path/to/user 文件夹中。
我在本地环境中建立了另一个 FTP 服务器,它运行良好。
某些非标准 FTP 服务器是否存在问题导致此类问题?
提前谢谢你
【问题讨论】:
标签: java ftp spring-integration-ftp