出站门道以及出站通道适配器出错



在播放 spring-integration-samples 项目的代码时,尝试实现以下流程:

read_file-> backup_file-> transform_file-> write_file

  • 'read_file'是文件:Inbound-channel-Adapter
  • 'backup_file'是'service-activator'调用java服务(执行复制文件(
  • 'transform_file'是2个变形金刚
  • 'write_file'是文件:正在编写处理的文件

一切都很好,直到我尝试实现" backup_file"步骤作为文件:出站门路
我有错误:

由于没有合格的'org.springframework.integration.file.file.filewritingmessagehandler'的合格豆而加载FileCopyDemo-file的错误:可预期的单匹配bean,但发现2:org.springframework.integration.integration.file.file.config.config.filewritingmessagemesgagemandlerforterforterberfortordorybeanbean#0 0,org.springframework.integration.file.config.filewritingmessagehandlerfactorybean#1


这是我的配置:

<!--read_file-->
<int-file:inbound-channel-adapter auto-startup="true" id="filesIn" channel="filesBackup"
        directory="${int.uvrp.original}" 
        filter="compositeFileFilter" >
        <int:poller id="poller" max-messages-per-poll="10" cron="*/10 * * * * *" default="true" />
</int-file:inbound-channel-adapter>
<!--backup_file-->
<int-file:outbound-gateway id="backupGate" request-channel="filesBackup" reply-channel="filesProcessing" directory="file:${int.archive}" />
<!--transform_file-->
<int-file:file-to-bytes-transformer input-channel="filesProcessing" output-channel="bytes" />
<int:transformer input-channel="bytes" output-channel="filesStore" ref="myTransformer1" method="transform" />
<!--write_file-->
<int-file:outbound-channel-adapter id="filesOut" channel="filesStore" directory="${int.processed}" delete-source-files="true"/>


有什么想法吗?

感谢您的提示。我已经从头开始创建了该项目,复制了配置文件,并且一切都按预期工作。

最新更新