我正在尝试从 FTP 复制文件并希望将其放置在本地计算机中。
为此,我创建了一个入站通道配置:
<bean name="publishStockSessionFactory"
class="org.springframework.integration.ftp.session.DefaultFtpSessionFactory">
<property name="host"
value="10.255.255.1" />
<property name="port" value="21" />
<property name="username"
value="test" />
<property name="password"
value="test" />
</bean>
<bean id="stockLocalDirectory" class="java.lang.String">
<constructor-arg
value="/opt/test" />
</bean>
<bean id="stockRemoteDirectory" class="java.lang.String">
<constructor-arg
value="stock" />
</bean>
<int-ftp:inbound-channel-adapter
local-directory="# {stockLocalDirectory}"
channel="stockFilesFromFTP"
session-factory="publishStockSessionFactory"
remote-directory="#{stockRemoteDirectory}"
delete-remote-files="true"
filename-regex="Stock*.csv" >
<int:poller fixed-rate="120000" max-messages-per-poll="100" />
</int-ftp:inbound-channel-adapter>
<int:publish-subscribe-channel id="stockFilesFromFTP" />
启动时出现的错误是
INFO | jvm 1 | main | 2013/01/15 22:20:02.715 | 2013-01-15 22:20:02,699
ERROR task-scheduler-4 ErrorHandler : failed to send message
to channel 'stockFilesFromFTP' within timeout: -1
我们打开的调试是
log4j.logger.org.springframework.aop=DEBUG
org.springframework.integration.channel.DirectChannel=DEBUG
org.springframework.integration.channel.MessagePublishingErrorHandler=DEBUG
org.springframework.integration.config.xml.PointToPointChannelParser=DEBUG
你能建议我如何调试这个错误吗?