RESOLVED - issue BATCH-920, BATCH-974: ChunkContext in StepContextRepeatCallback is unused
This commit is contained in:
@@ -8,9 +8,9 @@ import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.StepContribution;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.core.StepExecutionListener;
|
||||
import org.springframework.batch.core.scope.context.ChunkContext;
|
||||
import org.springframework.batch.core.step.tasklet.Tasklet;
|
||||
import org.springframework.batch.repeat.RepeatStatus;
|
||||
import org.springframework.core.AttributeAccessor;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
|
||||
|
||||
public class ErrorLogTasklet implements Tasklet, StepExecutionListener {
|
||||
@@ -21,7 +21,7 @@ public class ErrorLogTasklet implements Tasklet, StepExecutionListener {
|
||||
private String jobName;
|
||||
private String stepName;
|
||||
|
||||
public RepeatStatus execute(StepContribution contribution, AttributeAccessor attributes) throws Exception {
|
||||
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
|
||||
this.simpleJdbcTemplate.update("insert into ERROR_LOG values ('"+jobName+"', '"+stepName+"', 'Some records were skipped!')");
|
||||
return RepeatStatus.FINISHED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user