Fix (S)FTP gateway samples in docs for expression

SO: http://stackoverflow.com/questions/39293574/how-to-configure-sftp-outbound-gateway-using-java-config
This commit is contained in:
Artem Bilan
2016-09-02 14:56:18 -04:00
parent c2bdaf54a7
commit b66acf2363
2 changed files with 3 additions and 2 deletions

View File

@@ -888,7 +888,8 @@ public class FtpJavaApplication {
@Bean
@ServiceActivator(inputChannel = "ftpChannel")
public MessageHandler handler() {
FtpOutboundGateway ftpOutboundGateway = new FtpOutboundGateway(ftpSessionFactory(), "ls");
FtpOutboundGateway ftpOutboundGateway =
new FtpOutboundGateway(ftpSessionFactory(), "ls", "'my_remote_dir/'");
ftpOutboundGateway.setOutputChannelName("lsReplyChannel");
return ftpOutboundGateway;
}

View File

@@ -976,7 +976,7 @@ public class SftpJavaApplication {
@Bean
@ServiceActivator(inputChannel = "sftpChannel")
public MessageHandler handler() {
return new SftpOutboundGateway(ftpSessionFactory(), "ls");
return new SftpOutboundGateway(ftpSessionFactory(), "ls", "'my_remote_dir/'");
}
}