可以在运行时使用动态步骤配置Spring Batch作业吗? [英] Can Spring Batch jobs be configured at run time with dynamic steps?
问题描述
我正在考虑 Spring Batch 2.0 来实施管道流程。该过程正在侦听某些事件,并且需要根据事件类型及其内容执行一组转换步骤。
I am looking at Spring Batch 2.0 to implement a pipeline process. The process is listening to some event, and needs to perform a set of transformation steps base on the event type and its content.
Spring批次似乎很合适。但是,通过文档,每个示例都将它们的作业及其步骤配置为xml。框架是否支持在运行时创建作业并动态配置步骤?
Spring batch seem to be a great fit. However, going through the documentation, every example have them job and its steps configured in xml. Does the framework support creating jobs during run-time and configuring the steps dynamically?
推荐答案
作业配置本身在作业之前设置运行,但可以使用条件流程创建灵活的作业配置
the job configuration itself is set before the job runs, but it is possible to create a flexible job configuration with conditional flows
您不仅可以在作业运行时更改作业配置,而且在作业之间可以轻松更换配置
you can't just change the job configuration while the job runs, but between jobs its easy to replace the configuration
这篇关于可以在运行时使用动态步骤配置Spring Batch作业吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!