Updated to files to fit the Standard.

This commit is contained in:
Glenn Renfro
2022-07-25 11:41:43 -04:00
parent 39908bb499
commit 76a5d12136
200 changed files with 2839 additions and 4125 deletions

View File

@@ -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