Spring集成:文件从文件夹中读取两次
我有以下Spring集成配置:Spring集成:文件从文件夹中读取两次,spring,spring-integration,Spring,Spring Integration,我有以下Spring集成配置: <int-file:inbound-channel-adapter auto-startup="true" channel="localInboundFilesChannel" directory="${in.received}" auto-create-directory="true"> <int:poller fixed-rate=
<int-file:inbound-channel-adapter
auto-startup="true"
channel="localInboundFilesChannel"
directory="${in.received}"
auto-create-directory="true">
<int:poller fixed-rate="60" time-unit="SECONDS"/>
</int-file:inbound-channel-adapter>
<int-file:outbound-gateway
auto-startup="true"
request-channel="localInboundFilesChannel"
reply-channel="localProcessingFilesChannel"
directory="${in.processed}"
auto-create-directory="true"
delete-source-files="true"
requires-reply="false"
/>
我该怎么修?Spring Integrations bean配置中是否存在任何问题?当您声明bean
FileReadingMessageSource
添加过滤器org.springframework.integration.file.filters.AcceptOnceFileListFilter
时。当您声明beanFileReadingMessageSource
添加筛选器时,请参阅以获取更多信息org.springframework.integration.file.filters.AcceptOnceFileListFilter
。有关更多信息,请参阅它是每分钟发生一次还是每分钟发生一次?也许您已经加载了应用程序上下文的2个副本?我们是否有机会从我们这边播放一个简单的应用程序?现在显示的是该组件的标准行为。这真的是很糟糕的,有这样一个意外的状态在开箱即用…是的,应用程序上下文的2个副本被加载,这是问题的原因。谢谢它是每分钟发生一次还是每分钟发生一次?也许你已经加载了应用程序上下文的2个副本?我们是否有机会从我们这边玩一个简单的应用程序?现在显示的是该组件的标准行为。这真的是很糟糕的,有这样一个意外的状态在开箱即用…是的,应用程序上下文的2个副本被加载,这是问题的原因。谢谢
2017-08-11 14:06:31,250 INFO org.springframework.integration.file.FileReadingMessageSource - Created message: [GenericMessage [payload=target\received\request.csv, headers={id=1f4d1ac0-823e-f3b0-2554-caae8e330682, timestamp=1502453191250}]]
2017-08-11 14:06:31,250 INFO org.springframework.integration.file.FileReadingMessageSource - Created message: [GenericMessage [payload=target\received\request.csv, headers={id=73076423-f1ba-7cbe-a4c2-c5f02220e3f5, timestamp=1502453191250}]]