{"id":22997944,"url":"https://github.com/bmike2047/springboot-integration-sftp","last_synced_at":"2026-04-09T20:42:17.372Z","repository":{"id":253990989,"uuid":"845155759","full_name":"bmike2047/springboot-integration-sftp","owner":"bmike2047","description":"Spring Boot with Spring Integration will connect to an SFTP server download and process remote files","archived":false,"fork":false,"pushed_at":"2025-05-13T19:10:54.000Z","size":341,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T20:38:41.907Z","etag":null,"topics":["docker","docker-compose","java","jdk17","sftp-client","sftp-server","spring-boot","spring-integration","spring-security","system-integration"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmike2047.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-20T17:31:32.000Z","updated_at":"2025-05-13T19:10:58.000Z","dependencies_parsed_at":"2025-05-14T22:45:35.058Z","dependency_job_id":null,"html_url":"https://github.com/bmike2047/springboot-integration-sftp","commit_stats":null,"previous_names":["bmike2047/springboot-integration-sftp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmike2047/springboot-integration-sftp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmike2047%2Fspringboot-integration-sftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmike2047%2Fspringboot-integration-sftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmike2047%2Fspringboot-integration-sftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmike2047%2Fspringboot-integration-sftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmike2047","download_url":"https://codeload.github.com/bmike2047/springboot-integration-sftp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmike2047%2Fspringboot-integration-sftp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259909676,"owners_count":22930664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","java","jdk17","sftp-client","sftp-server","spring-boot","spring-integration","spring-security","system-integration"],"created_at":"2024-12-15T06:09:59.015Z","updated_at":"2026-04-09T20:42:12.323Z","avatar_url":"https://github.com/bmike2047.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Spring Boot Integration SFTP\n--\n![](assets/images/logo4.png)\n\n### Description\nThis project is an example of using Spring Boot with Spring integration and SFTP. \u003cbr/\u003e\nAn inbound channel adapter will connect to a SFTP server configured in application.properties.\u003cbr/\u003e\nIt will download all remote files and in our example it expects the files to contain a list of numbers separated by a line break.\u003cbr/\u003e\nEach number line will be processed and check if the number is a prime.\u003cbr/\u003e \nIf success the line will be logged if not an error will be thrown and the channel adapter poller will process the file again after sftp-poller-delay defined in application.properties.\u003cbr/\u003e\nSome design notes:\n* SFTP connection is done via caching session, and it will maintain permanent open connections. Testing of stale sessions is enabled.\u003cbr/\u003e\n* SFTP connection security is done via private key and known hosts file.\u003cbr/\u003e\n* Remote file synchronisation is done only once/file via SftpPersistentAcceptOnceFileListFilter. In case of failure the file is removed automatically from the filter's memory so a new retry will be possible on the next polling.\u003cbr/\u003e\n* A remote file will be copied into a local file as a processing fail-over strategy. \n* Local file processing is done only once/file via AcceptOnceFileListFilter, and it will be deleted in case of success by Pseudo Transaction Manager configured inside SftpAdapter.java. In case of failure the local file will be processed again on the next polling.\u003cbr/\u003e\n* Testing is done via an embedded Apache Mina sshd server.\u003cbr/\u003e\n* Docker project for SFTP server is provided to simulate a Production environment \n\n### Features\n* Automatically reconnect and retry in case of network failure.\u003cbr/\u003e\n* Recovery from catastrophic or processing failure via local file storage and Transaction Manager.\u003cbr/\u003e\n* Send any errors from errorChannel to the provided health-check via Spring Actuator.\u003cbr/\u003e\n* Health-check is secured via Spring Security.\u003cbr/\u003e\n\n### Usage\nRequires JDK 17\u003cbr/\u003e\nTo simulate a production SFTP server (if you don't have one already configured) the project provides a docker setup inside the ./docker folder.\u003cbr/\u003e\nUpload file(s): docker/sftp1/upload/numbers.txt \u003cbr/\u003e\nTo run the project:\u003cbr/\u003e\n```\ncd springboot-integration-sftp\ndocker-compose -f docker/docker-compose.yml build \u0026\u0026 docker-compose -f docker/docker-compose.yml up\n./gradlew bootJar \u0026\u0026 java -jar build/libs/springboot-integration-sftp-1.0.jar\n```\nTo run the tests use the following gradle task:\u003cbr/\u003e\n```\n./gradlew clean test\n```\n\u003e [!Note]\n\u003e Testing is done with the provided embedded Apache Mina sshd server.\u003cbr/\u003e\n\u003e Since both Apache Mina and the docker SFTP provided above use the same SFTP port (2222) you might want to stop the docker container when running the test task\u003cbr/\u003e\n\n\u003e [!TIP]\n\u003e Health-check can be accessed via: http://localhost:8080/actuator/health/application\u003cbr/\u003e\n\u003e In case any Load Balancer will need to check if the application si alive this endpoint will return an HTTP 200 OK no matter the file processing status: http://localhost:8080/actuator/info\u003cbr/\u003e\n\n\u003e [!TIP]\n\u003e I case you have older JDK version than JDK 17 and you are using IntelliJIDEA as IDE make sure Gradle JVM is set to JDK 17 in:\u003cbr/\u003e\n\u003e File | Settings | Build, Execution, Deployment | Build Tools | Gradle  -\u003e Gradle JVM\n\n### Screenshot\n![](assets/images/screenshot1.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmike2047%2Fspringboot-integration-sftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmike2047%2Fspringboot-integration-sftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmike2047%2Fspringboot-integration-sftp/lists"}