Java Spring作业启动器(Job2)在Spring升级到5.3.2.0版本后,将Job1退出代码更改为未知
我有两个作业(SampleJob,NewJob)NewJob取决于SampleJob的输出,因此NewJob必须等待SampleJob完成。我已经编写了这样的代码来实现这一点。在春季版本4.3.22发布之前,它运行良好。现在,在作业启动步骤之后,它并没有触发endStep,因为在作业侦听器的after步骤中,我的作业将以未知状态存在Java Spring作业启动器(Job2)在Spring升级到5.3.2.0版本后,将Job1退出代码更改为未知,java,spring,spring-batch,spring-framework-beans,Java,Spring,Spring Batch,Spring Framework Beans,我有两个作业(SampleJob,NewJob)NewJob取决于SampleJob的输出,因此NewJob必须等待SampleJob完成。我已经编写了这样的代码来实现这一点。在春季版本4.3.22发布之前,它运行良好。现在,在作业启动步骤之后,它并没有触发endStep,因为在作业侦听器的after步骤中,我的作业将以未知状态存在 <batch:job id="SAMPLE_JOB" job-repository="jobRepository"&g
<batch:job id="SAMPLE_JOB" job-repository="jobRepository">
<batch:step id="startStep" next="processStep">
<batch:tasklet ref="timerBegin" />
</batch:step>
<batch:step id="processStep" next="sampleJobLauncher">
<batch:tasklet ref="dataProcessTasklet" />
</batch:step>
<batch:step id="sampleJobLauncher" next="endBaselElRatioStep">
<job ref="NEW_JOB" job-launcher="jobLauncher" job-parameters-extractor="jobParametersExtractor"/>
</batch:step>
<batch:step id="endStep" >
<batch:tasklet ref="timerEnd" />
</batch:step>
<batch:listeners>
<batch:listener ref="SampleJobListener" />
</batch:listeners>
</batch:job>
private ExitStatus determineStepExitStatus(StepExecution stepExecution, JobExecution jobExecution) {
ExitStatus exitStatus = stepExecution.getExitStatus() != null ? stepExecution.getExitStatus() : ExitStatus.COMPLETED;
return exitStatus.and(jobExecution.getExitStatus());
}