我们的Web应用程序,并希望使用ftp:入站通道适配器读取从FTP &文件创建一个消息&其发送到通道入站通道适配器的本地目录和信息
- 当本地目录设置为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] 不表示可正确访问的目录。
在Message我想发送一些更多的字段为具有从属性文件按环境值的有效载荷,如何做呢?
<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>
由于事先
谢谢加里,为了在消息有效载荷中添加额外的信息,我将使用变压器。 这是撰写问题时的错字。真正的配置是 'local-directory =“#{servletContext.getRealPath('')}/temp/inFtp”' 正如您所提到的那样。并且该文件夹被创建并且文件被按预期复制,但由于它是共享临时空间,因此它被另一个进程清除。 – ManishSingh