Skip to content

Instantly share code, notes, and snippets.

@jonasurbano
Created January 27, 2018 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonasurbano/c14351140c6ff2706f00b141c1f98855 to your computer and use it in GitHub Desktop.
Save jonasurbano/c14351140c6ff2706f00b141c1f98855 to your computer and use it in GitHub Desktop.
@Bean
public Job job(Step step1) throws Exception {
return jobBuilderFactory.get("job1")
.incrementer(new RunIdIncrementer())
.start(step1)
.build();
}
@Bean
public Step step1() {
return stepBuilderFactory.get("step1")
.tasklet(new Tasklet() {
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
System.out.println("Reading...");
return null;
}
})
.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment