我需要在 Apache camel 中从文件夹中读取特定文件。如果文件存在则处理否则发送电子邮件。您能否建议如何实现这一目标。
我尝试了下面的代码,但如果文件不存在,则控制不会到达其他块 -
from("file:inbox?antInclude=*74_INT.json").
choice().
when(body().isNotNull()).
process(new fileProcess()).
otherwise().
process(new emailProcess());