INTSAMPLES-12 polishing
This commit is contained in:
1
basic/sftp/.gitignore
vendored
1
basic/sftp/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
/local-dir
|
/local-dir
|
||||||
|
/target
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
/**
|
/*
|
||||||
*
|
* Copyright 2002-2008 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
package org.springframework.integration.samples.sftp;
|
package org.springframework.integration.samples.sftp;
|
||||||
|
|
||||||
@@ -10,7 +22,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
|||||||
import org.springframework.integration.core.PollableChannel;
|
import org.springframework.integration.core.PollableChannel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ozhurakousky
|
* @author Oleg Zhurakousky
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SftpInboundReceiveSample {
|
public class SftpInboundReceiveSample {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
user=ozhurakousky
|
user=
|
||||||
passphrase=springintegration
|
passphrase=
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
-----BEGIN RSA PRIVATE KEY-----
|
|
||||||
Proc-Type: 4,ENCRYPTED
|
|
||||||
DEK-Info: DES-EDE3-CBC,89FEB82756CA8E56
|
|
||||||
|
|
||||||
TKzzEZLLatyEMrbDVvTOkf6mvdRr/XT8+AZ1ZZfcw02sdUXSVtLMWi1t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jcFRe8VTJeflwWafe1WHZCt4k3E1ac/
|
|
||||||
Ju6Gf/r19dLn+FQutHVMaD7YlkDmh+eEKGq0nQBViOYu3ERDYKEEUYO9ZeC/hdge
|
|
||||||
TmzNST5hLF5lDv3Gzh3RhBB/409Fo2MoL53gW7mteoYn0tSk4TtJ2fz3tdbBln76
|
|
||||||
z3ZE23Z88pL7YetcMgaIDeXBeybGK1HBtOq+NJvSF2hhT4SjIhgTMFM+2/dwsuRN
|
|
||||||
00ug+kAV/9uSQ+NQFA/5cZXqsBJ8eeTrpmBKV61Mrfd4xNaEEmJMYKhXegyFzfNy
|
|
||||||
iEBUh3JoE1cE9zpC/Qrbcw5asuflhEZ0+Ot5umipoJtipfD4hf6MWng2LKsddDR6
|
|
||||||
19CkO28M9SORD25AFfn4AEPqa+Lp9fMKgs3gm2KkTpSzuoZJp9Y85H/GmmeaZyzc
|
|
||||||
yqNQrOc8KhDFH9wtTMiquB2cY6qwEUngV57gaQslPE2AW0+tAjbYirku+hFkOZId
|
|
||||||
dOYmibf6CW7IvbIPPBR2dVlzyn9JNwszTNLxvJLGmF3btKKlKr/GyMomsR0AYSWn
|
|
||||||
LjCgN4NYYC/XhseeJ2D/vygBoV8kRL9UFDp8K+/IaI7S8RKsW3RrSA==
|
|
||||||
-----END RSA PRIVATE KEY-----
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:int="http://www.springframework.org/schema/integration"
|
|
||||||
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
|
|
||||||
xmlns:task="http://www.springframework.org/schema/task"
|
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
|
||||||
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
|
|
||||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd
|
|
||||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
|
||||||
http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-2.0.xsd">
|
|
||||||
|
|
||||||
<context:property-placeholder location="classpath:user.properties"/>
|
|
||||||
|
|
||||||
<bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.SftpSessionFactory">
|
|
||||||
<property name="host" value="localhost"/>
|
|
||||||
<property name="privateKey" value="classpath:META-INF/keys/sftp_rsa"/>
|
|
||||||
<property name="privateKeyPassphrase" value="${passphrase}"/>
|
|
||||||
<property name="port" value="22"/>
|
|
||||||
<property name="user" value="${user}"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<int-sftp:inbound-channel-adapter id="sftpInbondAdapter"
|
|
||||||
channel="receiveChannel"
|
|
||||||
session-factory="sftpSessionFactory"
|
|
||||||
local-directory="file:local-dir"
|
|
||||||
remote-directory="/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/samples/basic/sftp/remote-source-dir"
|
|
||||||
auto-create-directories="true"
|
|
||||||
auto-delete-remote-files-on-sync="false"
|
|
||||||
filename-pattern=".*\.txt$">
|
|
||||||
<int:poller fixed-rate="1000" max-messages-per-poll="1"/>
|
|
||||||
</int-sftp:inbound-channel-adapter>
|
|
||||||
|
|
||||||
<int:channel id="receiveChannel">
|
|
||||||
<int:queue/>
|
|
||||||
</int:channel>
|
|
||||||
|
|
||||||
</beans>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:int="http://www.springframework.org/schema/integration"
|
|
||||||
xmlns:int-sftp="http://www.springframework.org/schema/integration/sftp"
|
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.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/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp-2.0.xsd">
|
|
||||||
|
|
||||||
<context:property-placeholder location="classpath:user.properties"/>
|
|
||||||
|
|
||||||
<bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.SftpSessionFactory">
|
|
||||||
<property name="host" value="localhost"/>
|
|
||||||
<property name="privateKey" value="classpath:META-INF/keys/sftp_rsa"/>
|
|
||||||
<property name="privateKeyPassphrase" value="${passphrase}"/>
|
|
||||||
<property name="port" value="22"/>
|
|
||||||
<property name="user" value="${user}"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<int:channel id="inputChannel"/>
|
|
||||||
|
|
||||||
<int-sftp:outbound-channel-adapter id="sftpOutboundAdapter"
|
|
||||||
session-factory="sftpSessionFactory"
|
|
||||||
channel="inputChannel"
|
|
||||||
remote-file-expression="payload.getName() + '_foo'"
|
|
||||||
remote-directory="/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/samples/basic/sftp/remote-target-dir"/>
|
|
||||||
|
|
||||||
</beans>
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
log4j.rootCategory=WARN, stdout
|
|
||||||
|
|
||||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
|
||||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
|
||||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L - %m%n
|
|
||||||
|
|
||||||
log4j.category.org.springframework=WARN
|
|
||||||
log4j.category.org.springframework.integration.sftp=TRACE
|
|
||||||
log4j.category.org.springframework.integration.samples.sftp=TRACE
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
|||||||
user=ozhurakousky
|
|
||||||
passphrase=springintegration
|
|
||||||
Reference in New Issue
Block a user