【发布时间】:2018-01-23 10:09:53
【问题描述】:
假设我的 xml 中有这些配置,
<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。
【问题讨论】:
-
我猜你得到的也是一个docs.spring.io/spring-integration/api/org/springframework/…你试过用它的方法getIntegrationProperties()吗?
-
我认为该方法受到保护,我无法从其他类访问该方法。我也在使用spring integration v4.0.0。我会把它添加到我的问题中。
-
好的。 v.4.0.0 方法 getRemoteFilename 怎么样? docs.spring.io/autorepo/docs/spring-integration/4.0.0.RC1/api/… Sftp Outbound Channel Adapters 似乎已被 Sft Outbound Gateway 取代
标签: java spring spring-integration