@Configuration @ConditionalOnClass(value={,javax.sql.DataSource.class, }) @ConditionalOnBean(value= ) @EnableConfigurationProperties(value=BatchProperties.class) public class BatchAutoConfiguration extends Object
Auto-configuration
for Spring Batch. By default a
Runner will be created and all jobs in the context will be executed on startup.
Disable this behavior with spring.batch.job.enabled=false).
Alternatively, discrete Job names to execute on startup can be supplied by the User with a comma-delimited list: spring.batch.job.names=job1,job2. In this case the Runner will first find jobs registered as Beans, then those in the existing JobRegistry.
Modifier and Type | Class and Description |
---|---|
protected static class |
BatchAutoConfiguration.JpaBatchConfiguration |
Constructor and Description |
---|
BatchAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
BatchDatabaseInitializer |
batchDatabaseInitializer() |
ExitCodeGenerator |
jobExecutionExitCodeGenerator() |
JobExplorer |
jobExplorer(DataSource dataSource) |
JobLauncherCommandLineRunner |
jobLauncherCommandLineRunner(JobLauncher jobLauncher,
JobExplorer jobExplorer) |
JobOperator |
jobOperator(JobExplorer jobExplorer,
JobLauncher jobLauncher,
ListableJobLocator jobRegistry,
JobRepository jobRepository) |
@Bean @ConditionalOnMissingBean @ConditionalOnBean(value=javax.sql.DataSource.class) public BatchDatabaseInitializer batchDatabaseInitializer()
@Bean @ConditionalOnMissingBean public JobLauncherCommandLineRunner jobLauncherCommandLineRunner(JobLauncher jobLauncher, JobExplorer jobExplorer)
@Bean @ConditionalOnMissingBean public ExitCodeGenerator jobExecutionExitCodeGenerator()
@Bean @ConditionalOnMissingBean @ConditionalOnBean(value=javax.sql.DataSource.class) public JobExplorer jobExplorer(DataSource dataSource) throws Exception
Exception
@Bean @ConditionalOnMissingBean public JobOperator jobOperator(JobExplorer jobExplorer, JobLauncher jobLauncher, ListableJobLocator jobRegistry, JobRepository jobRepository) throws Exception
Exception
Copyright © 2014 Pivotal Software, Inc.. All rights reserved.