@Configuration @ConditionalOnClass(value={org.springframework.batch.core.launch.JobLauncher.class,javax.sql.DataSource.class,org.springframework.jdbc.core.JdbcOperations.class}) @ConditionalOnBean(value=org.springframework.batch.core.launch.JobLauncher.class) @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(BatchProperties properties,
ObjectProvider<org.springframework.batch.core.converter.JobParametersConverter> jobParametersConverter) |
Modifier and Type | Method and Description |
---|---|
BatchDatabaseInitializer |
batchDatabaseInitializer(DataSource dataSource,
ResourceLoader resourceLoader) |
JobExecutionExitCodeGenerator |
jobExecutionExitCodeGenerator() |
org.springframework.batch.core.explore.JobExplorer |
jobExplorer(DataSource dataSource) |
JobLauncherCommandLineRunner |
jobLauncherCommandLineRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher,
org.springframework.batch.core.explore.JobExplorer jobExplorer) |
org.springframework.batch.core.launch.support.SimpleJobOperator |
jobOperator(org.springframework.batch.core.explore.JobExplorer jobExplorer,
org.springframework.batch.core.launch.JobLauncher jobLauncher,
org.springframework.batch.core.configuration.ListableJobLocator jobRegistry,
org.springframework.batch.core.repository.JobRepository jobRepository) |
public BatchAutoConfiguration(BatchProperties properties, ObjectProvider<org.springframework.batch.core.converter.JobParametersConverter> jobParametersConverter)
@Bean @ConditionalOnMissingBean @ConditionalOnBean(value=javax.sql.DataSource.class) public BatchDatabaseInitializer batchDatabaseInitializer(DataSource dataSource, ResourceLoader resourceLoader)
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.batch.job", name="enabled", havingValue="true", matchIfMissing=true) public JobLauncherCommandLineRunner jobLauncherCommandLineRunner(org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.explore.JobExplorer jobExplorer)
@Bean @ConditionalOnMissingBean(value=ExitCodeGenerator.class) public JobExecutionExitCodeGenerator jobExecutionExitCodeGenerator()
@Bean @ConditionalOnMissingBean @ConditionalOnBean(value=javax.sql.DataSource.class) public org.springframework.batch.core.explore.JobExplorer jobExplorer(DataSource dataSource) throws Exception
Exception
@Bean @ConditionalOnMissingBean(value=org.springframework.batch.core.launch.JobOperator.class) public org.springframework.batch.core.launch.support.SimpleJobOperator jobOperator(org.springframework.batch.core.explore.JobExplorer jobExplorer, org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.configuration.ListableJobLocator jobRegistry, org.springframework.batch.core.repository.JobRepository jobRepository) throws Exception
Exception
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.