Upgrade to Spring Batch 3.0.1

Due to a mistake in Spring Batch 3.0.0 it has been necessary to
introduce a breaking API change (the addition of
BatchConfigurer.getJobExplorer()) in the 3.0.1 release. This commit
updates Boot to use 3.0.1 and modifies the Batch auto-configuration
and associated tests to implement the new method.
This commit is contained in:
Andy Wilkinson
2014-07-07 21:20:19 +01:00
committed by Phillip Webb
parent f7b7b1c8cb
commit 6a0eb90007
4 changed files with 23 additions and 6 deletions

View File

@@ -248,8 +248,8 @@ public class BatchAutoConfigurationTests {
return launcher;
}
@Bean
public JobExplorer jobExplorer() throws Exception {
@Override
public JobExplorer getJobExplorer() throws Exception {
MapJobExplorerFactoryBean explorer = new MapJobExplorerFactoryBean(
this.factory);
explorer.afterPropertiesSet();

View File

@@ -39,7 +39,6 @@ import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.RepeatStatus;
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.task.SyncTaskExecutor;
import org.springframework.transaction.PlatformTransactionManager;
@@ -177,8 +176,8 @@ public class JobLauncherCommandLineRunnerTests {
return launcher;
}
@Bean
public JobExplorer jobExplorer() throws Exception {
@Override
public JobExplorer getJobExplorer() throws Exception {
return new MapJobExplorerFactoryBean(this.jobRepositoryFactory).getObject();
}
}