SFTP sink is a simple option to push files to an SFTP server from incoming messages.
It uses an sftp-outbound-adapter, therefore incoming messages can be either a java.io.File object, a String (content of the file)
or an array of bytes (file content as well).
To use this sink, you need a username and a password to login.
|
Note
|
By default Spring Integration will use o.s.i.file.DefaultFileNameGenerator if none is specified. DefaultFileNameGenerator will determine the file name
based on the value of the file_name header (if it exists) in the MessageHeaders, or if the payload of the Message is already a java.io.File, then it will
use the original name of that file.
|
When configuring the sftp.factory.known-hosts-expression option, the root object of the evaluation is the application context, an example might be sftp.factory.known-hosts-expression = @systemProperties['user.home'] + '/.ssh/known_hosts'.
The sftp sink has the following options: