我们有 Web 应用程序并希望使用 ftp:inbound-channel-adapter 从 ftp 读取文件并创建消息并将其发送到通道
- 当local-directory设置为 local-directory="#servletContext.getRealPath('')}/temp/inFtp" 时,生成的消息是 GenericMessage [payload={applicationDeployPath}\temp\inFtp\xyz.stagging.dat, headers ={时间戳=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>
提前致谢