【发布时间】:2015-10-14 09:08:42
【问题描述】:
我们有 Web 应用程序并希望使用 ftp:inbound-channel-adapter 从 ftp 读取文件并创建消息并将其发送到通道
- 当 local-directory 设置为 local-directory="#servletContext.getRealPath('')}/temp/inFtp" 它给出 生成的消息是 GenericMessage [payload={applicationDeployPath}\temp\inFtp\xyz.stagging.dat, headers={timestamp=1444812027516, id=9b5f1581-bfd2-6690-d4ea-e7398e8ecbd6}]
但是没有创建目录,我检查了我在这里有完全权限。 路径 [{applicationDeployPath}\temp\inFtp] 不表示可正确访问的目录。
-
在消息中,我想根据环境发送更多字段作为具有属性文件值的有效负载,我该怎么做?
<int-ftp:inbound-channel-adapter id="ftpInboundAdaptor" channel="ftpInboundChannel" session-factory="ftpClientFactory" filename-pattern="*.stagging.dat" delete-remote-files="false" remote-directory="/stagging/" local-directory="#servletContext.getRealPath('')}/temp/inFtp" auto-create-local-directory="true"> <int:poller fixed-rate="1000"/> </int-ftp:inbound-channel-adapter>
提前致谢
【问题讨论】:
标签: ftp spring-integration adaptor