首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring Integration SFTP -从XML获取配置

Spring Integration SFTP -从XML获取配置
EN

Stack Overflow用户
提问于 2018-01-23 18:09:54
回答 1查看 181关注 0票数 1

假设我在xml中有这些配置,

代码语言:javascript
复制
<int-sftp:outbound-channel-adapter  id="sftpOutbound"
            channel="sftpChannel"
            auto-create-directory="true"
            remote-directory="/path/to/remote/directory/"
            session-factory="cachingSessionFactory">
    <int-sftp:request-handler-advice-chain>
        <int:retry-advice />
    </int-sftp:request-handler-advice-chain>
</int-sftp:outbound-channel-adapter>

如何检索Java类中的属性,即远程目录?

我尝试使用context.getBean('sftpOutbound'),但它返回EventDrivenConsumer类,该类没有获取配置的方法。

我使用的是spring-integration-sftp v 4.0.0。

EN

回答 1

Stack Overflow用户

发布于 2018-01-23 19:16:41

实际上,我更关心的是你为什么想要访问它。我的意思是,远程目录和其他属性将与每个消息的头部一起提供,因此您可以在消息级别访问它,但不能在事件驱动的消费者级别访问它,这是设计的结果,因此我提出了这个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48399059

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档