I have a spring-batch xml-based configuration that should be migrated to annotation-based configuration.
but I can't find any solution to define a chunk into the tasklet definition.
There are my xml and code base decleration:
<step id="files2Memory">
<tasklet>
<chunk reader="pointFileReader" processor="pointFileProcessor"
writer="pointFileWriter" commit-interval="50000"/>
</tasklet>
</step>
public Step files2Memory() {
return stepBuilders.get("files2Memory")
.tasklet(new Tasklet() {
@Override
public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws Exception {
return null;
}
})
.chunk(50000)
.reader(new PointFileReader())
.writer(new PointFileWriter())
.processor(new PointFileProcessor())
.build();
}
Best Regards