简体   繁体   中英

Sftp from windows server spring integration

I have a requirement to sftp different files onto a server.

The files that are in scope for delivery resides in a Windows server.

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.

Do you have any idea how I can sftp multiple files that are on a windows file share to other servers using spring integration?

The standard FileReadingMessageSource does exactly request functionality: 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 .

But since we deal with message channels in Spring Integration that pretty easy to send messages somewhere else, eg to JDBC.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM