简体   繁体   中英

How to get zip files from sftp server using spring

I'm working on a project where I have a lot of zip files in an sftp server. What I want to do is to connect to this sftp server and for each zip file if it exists, transfer it locally decompress it and make my process.

I managed to create my decompress class and set up the spring configuration for my project. I began to look for a tutorial and I found the sample integration spring example but I didn't understand two things. How can I get the information that my connection is established and how to know that there's some zip files in this server? If someone can explain me how to do this with an example it'll be great.

You can do it by using Spring Integration framework. It has it's own SFTP Adapter . Just initialize the SFTP Session Factory and create the session object.

More is here: http://docs.spring.io/spring-integration/reference/html/sftp.html

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