[英]Sftp from windows server spring integration
I have a requirement to sftp different files onto a server. 我需要将SFTP中的不同文件发送到服务器上。
The files that are in scope for delivery resides in a Windows server. 交付范围内的文件位于Windows服务器中。
I thought of using Spring Integration adapters for this purpose as not only do I have to deliver files but also have additional requirement of writing metadata information to database for each file delivery. 我考虑将Spring Integration适配器用于此目的,因为我不仅必须交付文件,而且还要求为每次文件交付将元数据信息写入数据库。
Do you have any idea how I can sftp multiple files that are on a windows file share to other servers using spring integration? 您是否知道如何使用Spring Integration将Windows文件中的多个文件与其他服务器SFTP共享?
The standard FileReadingMessageSource
does exactly request functionality: https://docs.spring.io/spring-integration/docs/4.3.12.RELEASE/reference/html/files.html#file-reading . 标准
FileReadingMessageSource
确实请求功能: https : //docs.spring.io/spring-integration/docs/4.3.12.RELEASE/reference/html/files.html#file-reading 。
There you can use that shared Windows dir to pull files and then you will send messages to the SftpMessageHandler
: https://docs.spring.io/spring-integration/docs/4.3.12.RELEASE/reference/html/sftp.html#sftp-outbound . 在那里,您可以使用该共享Windows目录提取文件,然后将消息发送到
SftpMessageHandler
: https : SftpMessageHandler
#sftp-outbound 。
But since we deal with message channels in Spring Integration that pretty easy to send messages somewhere else, eg to JDBC. 但是由于我们在Spring Integration中处理消息通道,因此很容易将消息发送到其他地方,例如到JDBC。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.