Remove System.out/.err Calls From All Tests
This commit is contained in:
@@ -16,20 +16,26 @@
|
||||
|
||||
package org.springframework.integration.sftp;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.integration.annotation.ServiceActivator;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author Josh Long
|
||||
* @author Gary Russell
|
||||
*/
|
||||
@Component("sftpAnnouncer")
|
||||
public class SftpFileAnnouncer {
|
||||
|
||||
private final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
@ServiceActivator
|
||||
public void announceFile(File file) {
|
||||
System.out.println("New file from the remote host has arrived: " + file.getAbsolutePath());
|
||||
logger.info("New file from the remote host has arrived: " + file.getAbsolutePath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
import org.springframework.integration.support.MessageBuilder;
|
||||
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
@@ -45,9 +45,7 @@ public class SftpOutboundTransferSample {
|
||||
inputChannel.send(message);
|
||||
Thread.sleep(2000);
|
||||
}
|
||||
System.out.println("Done");
|
||||
ac.stop();
|
||||
|
||||
ac.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user