Updated to files to fit the Standard.
This commit is contained in:
@@ -41,8 +41,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
*/
|
||||
@Configuration
|
||||
@EnableBatchProcessing
|
||||
@ConditionalOnProperty(prefix = "spring.cloud.task.test", name = "enable-job-configuration",
|
||||
havingValue = "true")
|
||||
@ConditionalOnProperty(prefix = "spring.cloud.task.test", name = "enable-job-configuration", havingValue = "true")
|
||||
public class JobConfiguration {
|
||||
|
||||
private static final int DEFAULT_CHUNK_COUNT = 3;
|
||||
@@ -62,8 +61,7 @@ public class JobConfiguration {
|
||||
public Step step1() {
|
||||
return this.stepBuilderFactory.get("step1").tasklet(new Tasklet() {
|
||||
@Override
|
||||
public RepeatStatus execute(StepContribution contribution,
|
||||
ChunkContext chunkContext) throws Exception {
|
||||
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
|
||||
System.out.println("Executed");
|
||||
return RepeatStatus.FINISHED;
|
||||
}
|
||||
@@ -72,8 +70,7 @@ public class JobConfiguration {
|
||||
|
||||
@Bean
|
||||
public Step step2() {
|
||||
return this.stepBuilderFactory.get("step2")
|
||||
.<String, String>chunk(DEFAULT_CHUNK_COUNT)
|
||||
return this.stepBuilderFactory.get("step2").<String, String>chunk(DEFAULT_CHUNK_COUNT)
|
||||
.reader(new ListItemReader<>(Arrays.asList("1", "2", "3", "4", "5", "6")))
|
||||
.processor(new ItemProcessor<String, String>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user