INTSAMPLES-89 - Upgrade to Spring Integration 2.2 RC3

* Test samples
* Polish documentation
* Polish code

For reference see: https://jira.springsource.org/browse/INTSAMPLES-89
This commit is contained in:
Gunnar Hillert
2012-10-28 22:51:14 -04:00
parent 251e035a18
commit 3c9c91c847
93 changed files with 1666 additions and 1454 deletions

View File

@@ -68,4 +68,4 @@ This sample uses a property **private.keyfile** to point to the location of your
>$ chmod 600 ~/.ssh/authorized_keys
* Then edit **authorized_keys** file and paste in the contents of the public key file **sftp_rsa.pub**.
* Move your private key file **sftp_rsa** to META-INF/keys directory
* Move your private key file **sftp_rsa** to the directory **/src/test/resources/META-INF/keys/** directory.

View File

@@ -3,13 +3,16 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.integration.samples</groupId>
<artifactId>sftp</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
<version>2.2.0.BUILD-SNAPSHOT</version>
<name>Samples (Basic) - SFTP Demo</name>
<packaging>jar</packaging>
<prerequisites>
<maven>2.2.1</maven>
</prerequisites>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.integration.version>2.1.0.RELEASE</spring.integration.version>
<log4j.version>1.2.16</log4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.integration.version>2.2.0.RC3</spring.integration.version>
<log4j.version>1.2.17</log4j.version>
<junit.version>4.10</junit.version>
</properties>
<dependencies>
@@ -35,13 +38,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>2.5.1</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>false</showDeprecation>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
</plugins>

View File

@@ -20,10 +20,10 @@
<property name="port" value="22"/>
<property name="user" value="${user}"/>
</bean>
<int-sftp:inbound-channel-adapter id="sftpInbondAdapter"
channel="receiveChannel"
session-factory="sftpSessionFactory"
channel="receiveChannel"
session-factory="sftpSessionFactory"
local-directory="file:local-dir"
remote-directory="<<SPECIFY REMOTE DIRECTORY (e.g., /{workspace}/samples/basic/sftp/remote-target-dir)>>"
auto-create-local-directory="true"
@@ -31,9 +31,9 @@
filename-regex=".*\.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>

View File

@@ -47,7 +47,7 @@
expression="headers['file_remoteDirectory'] + '/' + headers['file_remoteFile']"
request-channel="toRm"
command="rm"/>
<int:aggregator input-channel="aggregateResultsChannel"/>
</beans>

View File

@@ -10,7 +10,7 @@
http://www.springframework.org/schema/integration/sftp http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd">
<context:property-placeholder location="classpath:user.properties"/>
<bean id="sftpSessionFactory" class="org.springframework.integration.sftp.session.DefaultSftpSessionFactory">
<property name="host" value="localhost"/>
<property name="privateKey" value="classpath:META-INF/keys/sftp_rsa"/>
@@ -18,13 +18,13 @@
<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-filename-generator-expression="payload.getName() + '_foo'"
remote-directory="<SPECIFY REMOTE DIRECTORY (e.g., /{workspace}/samples/basic/sftp/remote-target-dir)>"/>
</beans>