INTSAMPLES-78 - Don't use hard-coded FTP port

For reference see: https://jira.springsource.org/browse/INTSAMPLES-78
This commit is contained in:
Gunnar Hillert
2012-12-11 17:04:19 -05:00
parent 44420d3355
commit ca9a7a6c75
7 changed files with 88 additions and 66 deletions

View File

@@ -10,25 +10,25 @@
http://www.springframework.org/schema/integration/ftp http://www.springframework.org/schema/integration/ftp/spring-integration-ftp.xsd">
<context:property-placeholder location="classpath:user.properties"/>
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="${host}"/>
<property name="port" value="${port}"/>
<property name="port" value="${availableServerPort}"/>
<property name="username" value="${userid}"/>
<property name="password" value="${password}"/>
</bean>
<int-ftp:inbound-channel-adapter id="ftpInbound" cache-sessions="false"
channel="ftpChannel"
channel="ftpChannel"
session-factory="ftpClientFactory"
filename-pattern="*.txt"
filename-pattern="*.txt"
auto-create-local-directory="true"
delete-remote-files="false"
remote-directory="/"
local-directory="#{ T(org.springframework.integration.samples.ftp.TestSuite).LOCAL_FTP_TEMP_DIR}/ftpInbound">
<int:poller fixed-rate="1000"/>
</int-ftp:inbound-channel-adapter>
<int:channel id="ftpChannel">
<int:queue/>
</int:channel>

View File

@@ -13,16 +13,16 @@
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="${host}"/>
<property name="port" value="${port}"/>
<property name="port" value="${availableServerPort}"/>
<property name="username" value="${userid}"/>
<property name="password" value="${password}"/>
</bean>
<int:channel id="ftpChannel"/>
<int-ftp:outbound-channel-adapter id="ftpOutbound" cache-sessions="false"
channel="ftpChannel"
channel="ftpChannel"
remote-directory="/"
session-factory="ftpClientFactory" />
</beans>

View File

@@ -17,7 +17,7 @@
<bean id="ftpSessionFactory"
class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="${host}"/>
<property name="port" value="${port}"/>
<property name="port" value="${availableServerPort}"/>
<property name="username" value="${userid}"/>
<property name="password" value="${password}"/>
</bean>

View File

@@ -1,4 +1,4 @@
userid=demo
password=demo
port=3333
availableServerPort=3333
host=localhost