2017-04-21 138 views
0

是否可以为弹簧集成SFTP设置连接超时?弹簧集成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> 

serverAliveIntervalserverAliveCountMax超时不做什么与连接超时任何区别。

回答

0

常见的几种特性暴露在会话工厂(因为4.0版本,这个现在包括connectTimeout,defaultTimeout和dataTimeout)

见文件ftp-session-factory