【发布时间】:2017-01-06 14:05:49
【问题描述】:
我的目标是继续读取文件夹并在文件夹中检测到新文件名时打印文件名。
我实际上会添加更多功能,但这是我尝试完成的第一步。
谢谢。
@Bean
public IntegrationFlow fileReadingFlow() {
return IntegrationFlows
.from(s -> s.file(new File('/tmp/test'))
.patternFilter("*.txt"),
e -> e.poller(Pollers.fixedDelay(1000)))
.transform(Transformers.fileToString())
##### What do I need to do here to print the file name?
.get();
}
【问题讨论】:
标签: spring spring-boot spring-integration