国务院 (@Pengyuyan)关于Springboot版本升级连接sftp异常 中发帖

springboot版本升级到3.4.5代码中使用的连接SFTP的依赖是”spring-integration-sftp“,当设置了factory.setKnownHostsResource(new FileSystemResource(haseSftpKnownhosts));日志就报异常。 
2025-06-20T10:52:11.732+08:00 WARN 104 --- []-nio2-thread-3] .s.s.ResourceKnownHostsServerKeyVerifier : Known hosts cannot be loaded from the: file [/NTT/hasesettlement-SIT/_ssh/known_hosts]
2025-06-20T10:52:11.738+08:00
java.lang.NullPointerException...