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

@@ -29,4 +29,5 @@ public class BatchJobApplication {
public static void main(String[] args) {
SpringApplication.run(BatchJobApplication.class, args);
}
}

View File

@@ -46,16 +46,13 @@ public class JobConfiguration {
@Bean
public Job job1() {
return this.jobBuilderFactory.get("job1")
.start(this.stepBuilderFactory.get("job1step1")
.tasklet(new Tasklet() {
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
logger.info("Job1 was run");
return RepeatStatus.FINISHED;
}
})
.build())
.build();
return this.jobBuilderFactory.get("job1").start(this.stepBuilderFactory.get("job1step1").tasklet(new Tasklet() {
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
logger.info("Job1 was run");
return RepeatStatus.FINISHED;
}
}).build()).build();
}
}

View File

@@ -26,7 +26,6 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.test.system.CapturedOutput;
import org.springframework.boot.test.system.OutputCaptureExtension;
import static org.assertj.core.api.Assertions.assertThat;
/**
@@ -37,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
@ExtendWith(OutputCaptureExtension.class)
public class BatchJobApplicationTests {
@Test
public void testBatchJobApp(CapturedOutput capturedOutput) throws Exception {
final String JOB_RUN_MESSAGE = " was run";
@@ -58,7 +56,6 @@ public class BatchJobApplicationTests {
assertThat(i).isGreaterThan(0);
String taskTitle = "Demo Batch Job Task";
Pattern pattern = Pattern.compile(taskTitle);
Matcher matcher = pattern.matcher(output);