我尝试使用spring集成SFTP适配器来设置从本地目录到sftp出站通道适配器的远程站点的数据馈送 . 饲料基本上工作正常 .
但我想使用缓存连接 . 使用cachingCessionFactory设置的官方指南:
http://docs.spring.io/spring-integration/reference/html/sftp.html#sftp-session-caching
<bean id="sftpSessionFactory"
class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
<property name="host" value="localhost"/>
</bean>
<bean id="cachingSessionFactory"
class="org.springframework.integration.file.remote.session.CachingSessionFactory">
<constructor-arg ref="sftpSessionFactory"/>
<constructor-arg value="10"/>
<property name="sessionWaitTimeout" value="1000"/>
</bean>
但似乎即使我定义了sftp-session-caching,一旦文件成功发送,sftp会话将被关闭?
有人有这方面的经验吗?