RESOLVED - issue BATCH-920, BATCH-974: ChunkContext in StepContextRepeatCallback is unused
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
package org.springframework.batch.test.sample;
|
||||
|
||||
import org.springframework.batch.core.StepContribution;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.AttributeAccessor;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
|
||||
|
||||
public class SampleTasklet implements Tasklet {
|
||||
@@ -18,7 +18,7 @@ public class SampleTasklet implements Tasklet {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public RepeatStatus execute(StepContribution contribution, AttributeAccessor attributes) throws Exception {
|
||||
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
|
||||
this.jdbcTemplate.update("insert into TESTS(ID, NAME) values (?, 'SampleTasklet" + id + "')", id);
|
||||
return RepeatStatus.FINISHED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user