Spring integration Spring集成DSL文件轮询入站通道适配器示例
在任何地方都找不到使用spring integration DSL only xml的示例。任何值得赞赏的指针,也需要轮询器在创建和修改文件时触发Spring integration Spring集成DSL文件轮询入站通道适配器示例,spring-integration,spring-dsl,Spring Integration,Spring Dsl,在任何地方都找不到使用spring integration DSL only xml的示例。任何值得赞赏的指针,也需要轮询器在创建和修改文件时触发 @Bean public IntegrationFlow fileReadingFlow() { return IntegrationFlows .from(s -> s.file(tmpDir.getRoot()).patternFilter("*.sitest"), e
@Bean
public IntegrationFlow fileReadingFlow() {
return IntegrationFlows
.from(s -> s.file(tmpDir.getRoot()).patternFilter("*.sitest"),
e -> e.poller(Pollers.fixedDelay(100)))
.transform(Transformers.fileToString())
.channel(MessageChannels.queue("fileReadingResultChannel"))
.get();
}
??
.from()
factory方法在这里接受一个MessageSources
factory,从这里使用.file()
factory方法等等
更多信息在项目测试中:谢谢Artem,但是这个轮询器会在文件创建/修改时触发吗?我的原稿。索尔。我们使用JavaNIO库来实现这一点。