title: How define a spring batch chunk in the tasklet with code
body: <p>I have a spring-batch xml-based configuration that should be migrated to annotation-based configuration.</p>
  
  <p>but I can't find any solution to define a chunk into the tasklet definition.</p>
  
  <p>There are my xml and code base decleration:</p>
  
  <pre><code> &lt;step id="files2Memory"&gt;
          &lt;tasklet&gt;
              &lt;chunk reader="pointFileReader" processor="pointFileProcessor"
                     writer="pointFileWriter" commit-interval="50000"/&gt;
          &lt;/tasklet&gt;
  &lt;/step&gt;
  
  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();
  }
  </code></pre>
  
  <p>Best Regards</p>