作为标题,如果我为 vsftpd 配置"require_ssl_reuse=NO",以下配置效果很好。
这是否可能以及如何配置弹簧集成FTP来连接没有配置"require_ssl_reuse=NO"的vsftpd?
例外:
Caused by: org.springframework.messaging.MessagingException: Failed to write to '/ftp/upload/test.txt.writing' while uploading the file; nested exception is java.io.IOException: Failed to write to '/ftp/upload/test.txt.writing'. Server replied with: 522 SSL connection failed; session reuse required: see require_ssl_reuse option in vsftpd.conf man page
这是我的配置:
<beans:bean id="ftpSessionFactory" class="org.springframework.integration.ftp.session.DefaultFtpsSessionFactory">
<beans:property name="host" value="202.101.1.106"/>
<beans:property name="port" value="21"/>
<beans:property name="username" value="tom"/>
<beans:property name="password" value="tom"/>
<beans:property name='clientMode' value='2'/>
<beans:property name='protocols' value='TLSv1, SSLv3'/>
</beans:bean>
请参阅此问题的答案以获取解决方法。
对会话工厂进行子类化并重写 createClientInstance
方法。
随意打开一个"改进"JIRA问题,我们可以考虑将其作为功能添加到框架中。更好的是,考虑做出贡献。