Spring integration Spring集成没有';t与FTP主机系统同步
我正在尝试将FTP文件夹与本地目录同步。这个FTP服务器运行在z/OS上,它是一个带有MVS操作系统的大型机 到目前为止,我已经有很多问题,甚至管理连接到我需要的文件夹,因为这个系统没有一个“正常”的文件夹系统 这是我所做的更改,以更改到我的文件所在的工作目录:Spring integration Spring集成没有';t与FTP主机系统同步,spring-integration,Spring Integration,我正在尝试将FTP文件夹与本地目录同步。这个FTP服务器运行在z/OS上,它是一个带有MVS操作系统的大型机 到目前为止,我已经有很多问题,甚至管理连接到我需要的文件夹,因为这个系统没有一个“正常”的文件夹系统 这是我所做的更改,以更改到我的文件所在的工作目录: public class DefaultFtpHostSessionFactory extends DefaultFtpSessionFactory { protected void postProcessClientAfter
public class DefaultFtpHostSessionFactory extends DefaultFtpSessionFactory {
protected void postProcessClientAfterConnect(FTPClient ftp) throws IOException {
ftp.changeToParentDirectory();
ftp.changeWorkingDirectory("E377D.");
}
}
现在我定义了一个输入通道适配器:
<int-ftp:inbound-channel-adapter
id="ljFtpInbound"
channel="ljFtpChannel"
session-factory="ljCachingSessionFactory"
auto-create-local-directory="true"
delete-remote-files="false"
filename-pattern="*"
remote-directory="*"
remote-file-separator=""
charset="UTF-8"
auto-startup="true"
preserve-timestamp="false"
local-filename-generator-expression="#this.toUpperCase()"
temporary-file-suffix=".writing"
local-directory="/tmp/">
<int:poller fixed-rate="1000" />
</int-ftp:inbound-channel-adapter>
在我的例子中是“星号”+“空白”+“远程文件名”,因为我必须使用“*”作为远程目录,所以它找不到文件
?您知道我是否无法设置远程目录(我尝试过但没有实现)?或者有另一种方法来同步这个奇怪的FTP系统
谢谢。这个怎么样
从4.3版开始,假设null
,则可以省略远程目录/远程目录表达式
属性。在这种情况下,根据FTP协议,客户端工作目录用作默认远程目录
这意味着您应该尝试升级到SpringIntegration4.3,并完全删除这个奇怪的*
。这个怎么样
从4.3版开始,假设null
,则可以省略远程目录/远程目录表达式
属性。在这种情况下,根据FTP协议,客户端工作目录用作默认远程目录
这意味着您应该尝试升级到SpringIntegration4.3,并完全删除这个奇怪的*
String remoteFilePath = remoteDirectoryPath + remoteFileSeparator + remoteFileName;