我定义了 ftp 适配器来连接到 ftp 服务器,但是我看到了 ftp 服务器日志并且没有看到发送到 ftp 服务器的请求。我的适配器代码是:
<bean id="ftpClientFactory" class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host" value="127.0.0.1"/>
<property name="port" value="21"/>
<property name="username" value="banks_reader"/>
<property name="password" value="123456"/>
<property name="clientMode" value="2"/>
<property name="fileType" value="2"/>
</bean>
<int:channel id="inbound1">
<int:queue/>
</int:channel>
<int:channel id="outbound"/>
<int-ftp:outbound-gateway id="gateway1"
session-factory="ftpClientFactory"
request-channel="inbound1"
reply-channel="outbound"
reply-timeout="777"
auto-create-local-directory="false"
auto-startup="true"
filename-pattern="*"
remote-file-separator="/"
command="ls"
command-options="-1 -f"
expression="payload"
order="1"
mput-regex=".*">
<int:poller fixed-delay="1000"/>
</int-ftp:outbound-gateway>
这表明:
DEBUG PollingConsumer:208 - Received no Message during the poll, returning 'false' in application log
当更改用户名和密码进行测试时(假通行证和用户名)不改变任何东西并抛出异常