Skip to content

Commit b599bfe

Browse files
committed
Temporarily work around deprecations in Spring Batch
See gh-31623
1 parent 26741d8 commit b599bfe

File tree

1 file changed

+3
-2
lines changed
  • spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch

1 file changed

+3
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/batch/BasicBatchConfigurer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.batch.core.explore.JobExplorer;
2323
import org.springframework.batch.core.explore.support.JobExplorerFactoryBean;
2424
import org.springframework.batch.core.launch.JobLauncher;
25-
import org.springframework.batch.core.launch.support.SimpleJobLauncher;
25+
import org.springframework.batch.core.launch.support.TaskExecutorJobLauncher;
2626
import org.springframework.batch.core.repository.JobRepository;
2727
import org.springframework.batch.core.repository.support.JobRepositoryFactoryBean;
2828
import org.springframework.beans.factory.InitializingBean;
@@ -117,8 +117,9 @@ protected JobExplorer createJobExplorer() throws Exception {
117117
return factory.getObject();
118118
}
119119

120+
@SuppressWarnings({ "deprecation", "removal" })
120121
protected JobLauncher createJobLauncher() throws Exception {
121-
SimpleJobLauncher jobLauncher = new SimpleJobLauncher();
122+
TaskExecutorJobLauncher jobLauncher = new TaskExecutorJobLauncher();
122123
jobLauncher.setJobRepository(getJobRepository());
123124
jobLauncher.afterPropertiesSet();
124125
return jobLauncher;

0 commit comments

Comments
 (0)