INFO: Job: [SimpleJob: [name=myJob]] completed with the following parameters: [{}] and the following status: [STOPPED]
Status is: STOPPED, job execution id 0
#1 step1 COMPLETED
#2 step2 STOPPED
在第二个之后:
INFO: Job: [SimpleJob: [name=myJob]] completed with the following parameters: [{}] and the following status: [COMPLETED]
Status is: COMPLETED, job execution id 1
#3 step2 COMPLETED
#4 step3 COMPLETED
1 回答
您只需使用相同的参数运行它 . 只是确保你没有使用
RunIdIncrementer
或类似的自动生成唯一的作业参数 .例如,参见this example . 第一次运行后,我们有:
在第二个之后:
请注意,将重新执行已停止的步骤 . 如果您正在使用面向块的步骤,请确保至少
ItemReader
实现ItemStream
(并使用正确的语义执行) .标有
allowRestartWithComplete
的步骤将始终重新运行 .