moved spaces to tabs for the sftp package
This commit is contained in:
@@ -7,14 +7,13 @@ import java.io.File;
|
||||
|
||||
/**
|
||||
* @author Josh Long
|
||||
*
|
||||
*/
|
||||
@Component("sftpAnnouncer")
|
||||
public class SftpFileAnnouncer {
|
||||
|
||||
@ServiceActivator
|
||||
public void announceFile(File file){
|
||||
System.out.println( "New file from the remote host has arrived: " + file.getAbsolutePath()) ;
|
||||
}
|
||||
@ServiceActivator
|
||||
public void announceFile(File file) {
|
||||
System.out.println("New file from the remote host has arrived: " + file.getAbsolutePath());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
*/
|
||||
public class TestInboundSftp {
|
||||
|
||||
static public void main(String [] args) throws Throwable {
|
||||
ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("TestInboundSftp.xml");
|
||||
classPathXmlApplicationContext.start();
|
||||
}
|
||||
static public void main(String[] args) throws Throwable {
|
||||
ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("TestInboundSftp.xml");
|
||||
classPathXmlApplicationContext.start();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
-->
|
||||
|
||||
<beans:beans
|
||||
xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
xmlns:lang="http://www.springframework.org/schema/lang"
|
||||
xmlns:sftp="http://www.springframework.org/schema/integration/sftp"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
xmlns:lang="http://www.springframework.org/schema/lang"
|
||||
xmlns:sftp="http://www.springframework.org/schema/integration/sftp"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
|
||||
@@ -34,31 +34,31 @@
|
||||
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
|
||||
http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-2.0.xsd">
|
||||
|
||||
|
||||
<context:component-scan base-package="org.springframework.integration.sftp"/>
|
||||
<context:property-placeholder
|
||||
location="file://${user.home}/Desktop/sftp.properties"
|
||||
ignore-unresolvable="true"/>
|
||||
|
||||
<context:component-scan base-package="org.springframework.integration.sftp"/>
|
||||
<context:property-placeholder
|
||||
location="file://${user.home}/Desktop/sftp.properties"
|
||||
ignore-unresolvable="true"/>
|
||||
|
||||
|
||||
<channel id="inboundFilesChannel"/>
|
||||
<channel id="inboundFilesChannel"/>
|
||||
|
||||
|
||||
<sftp:inbound-channel-adapter
|
||||
key-file="${sftp.key}"
|
||||
remote-directory="${sftp.remote-dir}"
|
||||
channel="inboundFilesChannel"
|
||||
filename-pattern=".*?jpg"
|
||||
username="${sftp.username}"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="true"
|
||||
host="${sftp.host}">
|
||||
<poller>
|
||||
<interval-trigger interval="1000" time-unit="MILLISECONDS"/>
|
||||
</poller>
|
||||
</sftp:inbound-channel-adapter>
|
||||
<sftp:inbound-channel-adapter
|
||||
key-file="${sftp.key}"
|
||||
remote-directory="${sftp.remote-dir}"
|
||||
channel="inboundFilesChannel"
|
||||
filename-pattern=".*?jpg"
|
||||
username="${sftp.username}"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="true"
|
||||
host="${sftp.host}">
|
||||
<poller>
|
||||
<interval-trigger interval="1000" time-unit="MILLISECONDS"/>
|
||||
</poller>
|
||||
</sftp:inbound-channel-adapter>
|
||||
|
||||
|
||||
<service-activator ref="sftpAnnouncer" input-channel="inboundFilesChannel"/>
|
||||
<service-activator ref="sftpAnnouncer" input-channel="inboundFilesChannel"/>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
@@ -16,18 +16,17 @@
|
||||
-->
|
||||
|
||||
|
||||
|
||||
<beans:beans
|
||||
xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
xmlns:lang="http://www.springframework.org/schema/lang"
|
||||
xmlns:sftp="http://www.springframework.org/schema/integration/sftp"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:util="http://www.springframework.org/schema/util"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
xmlns:lang="http://www.springframework.org/schema/lang"
|
||||
xmlns:sftp="http://www.springframework.org/schema/integration/sftp"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd
|
||||
@@ -36,20 +35,20 @@
|
||||
http://www.springframework.org/schema/integration/sftp
|
||||
http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-2.0.xsd">
|
||||
|
||||
<context:component-scan base-package="org.springframework.integration.sftp"/>
|
||||
<context:component-scan base-package="org.springframework.integration.sftp"/>
|
||||
|
||||
|
||||
<channel id="inboundFilesChannel"/>
|
||||
<channel id="inboundFilesChannel"/>
|
||||
|
||||
<sftp:outbound-channel-adapter
|
||||
key-file="/home/user/user.pem"
|
||||
remote-directory="/home/ubuntu/remote_mount_key"
|
||||
auto-create-directories="true"
|
||||
channel="inboundFilesChannel"
|
||||
username="ubuntu"
|
||||
host="siteonec2usingubuntuami.com"
|
||||
/>
|
||||
<sftp:outbound-channel-adapter
|
||||
key-file="/home/user/user.pem"
|
||||
remote-directory="/home/ubuntu/remote_mount_key"
|
||||
auto-create-directories="true"
|
||||
channel="inboundFilesChannel"
|
||||
username="ubuntu"
|
||||
host="siteonec2usingubuntuami.com"
|
||||
/>
|
||||
|
||||
<service-activator input-channel="inboundFilesChannel" ref="sftpAnnouncer"/>
|
||||
<service-activator input-channel="inboundFilesChannel" ref="sftpAnnouncer"/>
|
||||
|
||||
</beans:beans>
|
||||
</beans:beans>
|
||||
|
||||
Reference in New Issue
Block a user