我需要将不同的文件sftp到服务器上。
交付范围内的文件位于Windows服务器中。
我考虑为此目的使用Spring Integration适配器,因为我不仅必须交付文件,而且还需要为每个文件交付将元数据信息写入数据库。
您知道如何使用spring集成将Windows文件共享上的多个文件sftp到其他服务器吗?
我需要将不同的文件sftp到服务器上。
交付范围内的文件位于Windows服务器中。
我考虑为此目的使用Spring Integration适配器,因为我不仅必须交付文件,而且还需要为每个文件交付将元数据信息写入数据库。
您知道如何使用spring集成将Windows文件共享上的多个文件sftp到其他服务器吗?
该标准FileReadingMessageSource
确实要求功能:https ://docs.spring.io/spring-integration/docs/4.3.12.RELEASE/reference/html/files.html#file-reading 。
在那里,您可以使用该共享的 Windows 目录来提取文件,然后您将发送消息到SftpMessageHandler
:https ://docs.spring.io/spring-integration/docs/4.3.12.RELEASE/reference/html/sftp.html# sftp 出站。
但是由于我们在 Spring Integration 中处理消息通道,因此很容易将消息发送到其他地方,例如 JDBC。