类 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.