对于Spring批处理作业,我有以下配置:第一个流程:
return new FlowBuilder<SimpleFlow>("flowB")
.start(stepA)
.next(stepB)
.next(stepC)
.end(); 第二流程:
return new FlowBuilder<SimpleFlow>("flowNotify")
.start(stepNotify)
.end();ANd我的职务配置如下:
Job job = jobBuilderFactory.get("job1")
.listener(customJobListener)
.start(stepOne)
.next(customDecider).on("STATUS_STOP").to(flowNotify)
.from(customDecider).on("STATUS_PROCEED").to(flowB)
.end()
.build();
return job;基于从决策器返回的FlowExitStatus,作业在这两个流中都运行良好,但是在最后一步作业没有终止后,我需要手动终止作业。
请有人指导我在最后一步完成后如何终止工作。
发布于 2022-06-09 20:50:21
我解决了这个问题。我在Spring批处理作业中有Spring存储库,这导致了问题,如下所示:https://github.com/spring-guides/gs-batch-processing/issues/40
https://stackoverflow.com/questions/72564627
复制相似问题