Java Spring批处理:作业依赖关系

Java Spring批处理:作业依赖关系,java,spring,jakarta-ee,spring-batch,Java,Spring,Jakarta Ee,Spring Batch,我需要保存3个文件到数据库:A,B,C。 文件B不能插入到A之前的DB中,文件C不能插入到B之前。 创建作业之间依赖关系的最佳方法是什么?用三个步骤编写一个作业:在步骤1中将文件A写入数据库,在步骤2将文件B写入,在步骤3将文件C写入 <job id="myJob> <step id="step1" next="step2"><!-- write file A --></step> <step id="step2" next="ste

我需要保存3个文件到数据库:A,B,C。 文件B不能插入到A之前的DB中,文件C不能插入到B之前。

创建作业之间依赖关系的最佳方法是什么?

用三个步骤编写一个作业:在步骤1中将文件A写入数据库,在步骤2将文件B写入,在步骤3将文件C写入

<job id="myJob>
  <step id="step1" next="step2"><!-- write file A --></step>
  <step id="step2" next="step3"><!-- write file B --></step>
  <step id="step3"><!-- write file C --></step>
</job>

用3个步骤编写一个作业:在步骤1中将文件A写入数据库,在步骤2中写入文件B,在步骤3中写入文件C

<job id="myJob>
  <step id="step1" next="step2"><!-- write file A --></step>
  <step id="step2" next="step3"><!-- write file B --></step>
  <step id="step3"><!-- write file C --></step>
</job>

用3个步骤编写一个作业:在步骤1中将文件A写入数据库,在步骤2中写入文件B,在步骤3中写入文件C

<job id="myJob>
  <step id="step1" next="step2"><!-- write file A --></step>
  <step id="step2" next="step3"><!-- write file B --></step>
  <step id="step3"><!-- write file C --></step>
</job>

用3个步骤编写一个作业:在步骤1中将文件A写入数据库,在步骤2中写入文件B,在步骤3中写入文件C

<job id="myJob>
  <step id="step1" next="step2"><!-- write file A --></step>
  <step id="step2" next="step3"><!-- write file B --></step>
  <step id="step3"><!-- write file C --></step>
</job>