| | |
| | | package com.ruoyi.inspectiontask.service.impl; |
| | | |
| | | import org.quartz.*; |
| | | import org.quartz.Scheduler; |
| | | import org.quartz.spi.TriggerFiredBundle; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.config.AutowireCapableBeanFactory; |
| | |
| | | import org.springframework.context.ApplicationContextAware; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.scheduling.quartz.JobDetailFactoryBean; |
| | | import org.springframework.scheduling.quartz.SchedulerFactoryBean; |
| | | import org.springframework.scheduling.quartz.SpringBeanJobFactory; |
| | | |
| | | import javax.sql.DataSource; |
| | | |
| | | @Configuration |
| | | //@Configuration |
| | | public class QuartzConfig { |
| | | @Autowired |
| | | // @Autowired |
| | | private ApplicationContext applicationContext; |
| | | |
| | | // 假设已配置名为dataSource的数据源Bean |
| | | @Autowired |
| | | // @Autowired |
| | | private DataSource dataSource; |
| | | |
| | | @Bean |