Package cn.net.pap.quartz
Class QuartzAutoConfiguration
java.lang.Object
cn.net.pap.quartz.QuartzAutoConfiguration
@Configuration
@ConditionalOnClass(com.zaxxer.hikari.HikariDataSource.class)
public class QuartzAutoConfiguration
extends Object
AutoConfiguration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>contextClosedHandler(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor schedulerThreadPool) quartzDataSourceorg.springframework.jdbc.datasource.init.DataSourceInitializerquartzDataSourceInitializer(DataSource dataSource) quartzDataSourceInitializerorg.springframework.scheduling.quartz.SchedulerFactoryBeanorg.springframework.scheduling.quartz.SchedulerFactoryBeanorg.springframework.scheduling.quartz.SchedulerFactoryBeanschedulerFactoryBeanorg.springframework.scheduling.concurrent.ThreadPoolTaskExecutorschedulerThreadPool
-
Constructor Details
-
QuartzAutoConfiguration
public QuartzAutoConfiguration()
-
-
Method Details
-
quartzDataSource
quartzDataSource- Returns:
- Throws:
SQLException
-
quartzDataSourceInitializer
@Bean("quartzDataSourceInitializer") public org.springframework.jdbc.datasource.init.DataSourceInitializer quartzDataSourceInitializer(DataSource dataSource) quartzDataSourceInitializer- Parameters:
dataSource-- Returns:
-
schedulerFactoryBean
@Bean public org.springframework.scheduling.quartz.SchedulerFactoryBean schedulerFactoryBean() throws ExceptionschedulerFactoryBean- Returns:
- Throws:
Exception
-
scheduler1
@ConditionalOnProperty(name="cn.net.pap.quartz.scheduler.multi", havingValue="true") @Bean(name="scheduler1") public org.springframework.scheduling.quartz.SchedulerFactoryBean scheduler1() throws Exception- Throws:
Exception
-
scheduler2
@ConditionalOnProperty(name="cn.net.pap.quartz.scheduler.multi", havingValue="true") @Bean(name="scheduler2") public org.springframework.scheduling.quartz.SchedulerFactoryBean scheduler2() throws Exception- Throws:
Exception
-
schedulerThreadPool
@Bean public org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor schedulerThreadPool()schedulerThreadPool- Returns:
-
contextClosedHandler
@Bean public org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent> contextClosedHandler(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor schedulerThreadPool)
-