设置Spring Integration SFTP的连接超时

时间:2017-04-21 13:50:25

标签: java spring connection integration sftp

是否可以为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>

serverAliveInterval serverAliveCountMax 超时与连接超时有什么不同。

1 个答案:

答案 0 :(得分:0)

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

参见文件ftp-session-factory

相关问题