Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.github.kuljaninemir:spring-boot-ftp-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.github.kuljaninemir:spring-boot-ftp-client

Demo project for Spring Boot

  • 2.0.05
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

Build Status Coverage Status HitCount contributions welcome

Spring boot ftp client

Spring boot project for using Apache Commons FTPClient through a simplified interface.

Usage

Add the following dependency:

<dependency>
  <groupId>com.github.kuljaninemir</groupId>
  <artifactId>spring-boot-ftp-client</artifactId>
  <version>2.0.05</version>
</dependency>

Add the following to your application.yml:

ftp:
  username: username
  password: password
  server: server

Inject a FTPFileWriter like so:

@Inject
FTPFileWriter ftpFileWriter;

Connect and start using the FTPFileWriter

ftpFileWriter.open();
if(ftpFileWriter.isConnected()){
    ftpFileWriter.loadFile(path, outputstream);
    ftpFileWriter.saveFile(inputstream, remotepath, false);
    ftpFileWriter.saveFile(sourcepath, destpath, true);
}
ftpFileWriter.close();

Configuration

By default port 21 is used and keepAliveTimeout is not set. You can change both these things by supplying these additional properties:

ftp:
  port: 21
  keepAliveTimout: 10

If you want the FTPFileWriter to connect as soon as it's injected, you can set this:

ftp:
  autoStart: true

If you want to access the FTPClient object you can extend FTPFileWriterImpl and make it the primary bean, like this:

@Primary
@Component
public class FTPFileWriterImplExt extends FTPFileWriterImpl {
    public void doSomething(){
        //this.ftpClient is accessible here.
    }
}

Built With

  • Maven - Dependency Management

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

FAQs

Package last updated on 12 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc