如何使用Camel获取目录中文件数量的计数?
谢谢
我发现了如何使用Camel做到这一点-以下是一个示例:
// add our route to the CamelContext
context.addRoutes(new RouteBuilder() {
public void configure() {
from("file:"+getFullPath()+"?noop=true")
.process(new Processor() {
public void process(Exchange exchange) throws Exception {
System.out.println("size is #" +exchange.getProperty("CamelBatchSize"));
System.out.println(file.getName());
}
}).to("file:/home/anton/tmp/outbox?");
}
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句