Boot updated bom to use batch 5.x
Updated code to remove new deprecations Updated code to fix compilation errors. Updated code to add new bits for tests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2016-2019 the original author or authors.
|
||||
* Copyright 2016-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.listener.JobExecutionListenerSupport;
|
||||
import org.springframework.batch.core.JobExecutionListener;
|
||||
import org.springframework.cloud.task.listener.annotation.BeforeTask;
|
||||
import org.springframework.cloud.task.repository.TaskExecution;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Michael Minella
|
||||
*/
|
||||
public class TaskBatchExecutionListener extends JobExecutionListenerSupport {
|
||||
public class TaskBatchExecutionListener implements JobExecutionListener {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(TaskBatchExecutionListener.class);
|
||||
|
||||
|
||||
@@ -83,7 +83,6 @@ public class TaskJobLauncherApplicationRunnerCoreTests {
|
||||
@Autowired
|
||||
private JobExplorer jobExplorer;
|
||||
|
||||
@Autowired
|
||||
private PlatformTransactionManager transactionManager;
|
||||
|
||||
private TaskJobLauncherApplicationRunner runner;
|
||||
@@ -98,6 +97,7 @@ public class TaskJobLauncherApplicationRunnerCoreTests {
|
||||
|
||||
@BeforeEach
|
||||
public void init() {
|
||||
this.transactionManager = new ResourcelessTransactionManager();
|
||||
this.jobs = new JobBuilderFactory(this.jobRepository);
|
||||
this.steps = new StepBuilderFactory(this.jobRepository, this.transactionManager);
|
||||
Tasklet tasklet = (contribution, chunkContext) -> RepeatStatus.FINISHED;
|
||||
|
||||
Reference in New Issue
Block a user