我有一个Spring应用程序,我正在重写StepExecutionListener并提供自己的实现。BatchConfig.java类中,我将Tasklet步骤定义为: public static org.springframework.batch.core.scope.JobScopejobScope() {
org.springframework.batch.core.scope.JobScope jobScope = new org.sp
public class FirstListener implements StepExecutionListener {
public void beforeStep(StepExecution调用stepExecution.setTerminateOnly()和stepExecution.setExitStatus()就足以让Spring停止作业,而不执行任何后续步骤。状态将正确记录在BATCH_JOB_EXECUTION表中。public class SecondListener implements S
我知道这可能是一种反模式,但我需要在SpringBatch应用程序读取时记录它读取的每个项目,而不考虑块大小(这是没有办法的)。Component
public class YearEndRowMapper implements RowMapper<DistributionItem>, ApplicationContextAware, StepExecutionListener