【问题标题】:Setting connection timeout for Spring Integration SFTP为 Spring Integration SFTP 设置连接超时
【发布时间】:2017-09-18 13:28:27
【问题描述】:

是否可以为 Spring 集成 SFTP 设置连接超时?

<bean id="defaultSftpSessionFactory"
        class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
    <property name="host" value=""/>
    <property name="privateKey" value=""/>
    <property name="privateKeyPassphrase" value=""/>
    <property name="port" value=""/>
    <property name="user" value=""/>
    <property name="serverAliveInterval" value="100000"/>
    <property name="serverAliveCountMax" value="5"/>
    <property name="timeout" value="100000"/>
</bean>

serverAliveIntervalserverAliveCountMaxtimeout 与连接超时无关。

【问题讨论】:

    标签: java spring connection integration sftp


    【解决方案1】:

    在会话工厂中公开了几个常用属性(从 4.0 版开始,现在包括 connectTimeout、defaultTimeout 和 dataTimeout)

    参见文档ftp-session-factory

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-03-10
      • 1970-01-01
      • 1970-01-01
      • 2012-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多