我已经使用Spring Boot 1.5.8和相关的Spring Batch和Integration启动器设置了批处理作业。我想使用文件轮询器使用传入文件启动作业。
我以前使用过Spring Integration来使用文件轮询器来触发批处理作业。这仍然是一样的吗? Spring Batch本身是否具有这个非常基本的功能,还是我必须涉及Spring Integration?
即使需要Spring Integration,任何人都可以指向基于Annotation的示例应用程序吗?
答案 0 :(得分:2)
好问题。让我们回答每个人:
这仍然是一样的吗? Yes
Spring Batch本身是否具有这个非常基本的功能,还是我必须涉及Spring Integration? No, you have to use Spring Integration
即使需要Spring Integration,任何人都可以指向基于Annotation的示例应用程序吗?
We are in the midst of updating all the Batch docs to include annotation as well as XML based configurations. Here is a doc that is in PR but will be merged in the next release that has the examples you are looking for:
https://github.com/cppwfs/spring-batch/blob/1f7cada52aba95bcb23d06bc034b21fe1de0a7a5/spring-batch-docs/asciidoc/spring-batch-integration.adoc#launching-batch-jobs-through-messages