类 BatchAutoConfiguration
- java.lang.Object
- org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration
@Configuration @ConditionalOnClass({org.springframework.batch.core.launch.JobLauncher.class,javax.sql.DataSource.class,org.springframework.jdbc.core.JdbcOperations.class}) @ConditionalOnBean(org.springframework.batch.core.launch.JobLauncher.class) @EnableConfigurationProperties(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.
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static class
BatchAutoConfiguration.JpaBatchConfiguration
构造器概要
构造器 构造器 说明 BatchAutoConfiguration(BatchProperties properties, org.springframework.beans.factory.ObjectProvider<org.springframework.batch.core.converter.JobParametersConverter> jobParametersConverter)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 BatchDatabaseInitializer
batchDatabaseInitializer(DataSource dataSource, org.springframework.core.io.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)
构造器详细资料
BatchAutoConfiguration
public BatchAutoConfiguration(BatchProperties properties, org.springframework.beans.factory.ObjectProvider<org.springframework.batch.core.converter.JobParametersConverter> jobParametersConverter)
方法详细资料
batchDatabaseInitializer
@Bean @ConditionalOnMissingBean @ConditionalOnBean(javax.sql.DataSource.class) public BatchDatabaseInitializer batchDatabaseInitializer(DataSource dataSource, org.springframework.core.io.ResourceLoader resourceLoader)
jobLauncherCommandLineRunner
@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)
jobExecutionExitCodeGenerator
@Bean @ConditionalOnMissingBean(org.springframework.boot.ExitCodeGenerator.class) public JobExecutionExitCodeGenerator jobExecutionExitCodeGenerator()
jobExplorer
@Bean @ConditionalOnMissingBean @ConditionalOnBean(javax.sql.DataSource.class) public org.springframework.batch.core.explore.JobExplorer jobExplorer(DataSource dataSource) throws Exception
- 抛出:
Exception
jobOperator
@Bean @ConditionalOnMissingBean(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