| | |
| | | package com.ruoyi.inspectiontask.service.impl; |
| | | |
| | | import lombok.RequiredArgsConstructor; |
| | | 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.ApplicationContext; |
| | | import org.springframework.context.ApplicationContextAware; |
| | |
| | | |
| | | |
| | | @Configuration |
| | | @RequiredArgsConstructor |
| | | public class QuartzConfig { |
| | | @Autowired |
| | | private ApplicationContext applicationContext; |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | // 假设已配置名为dataSource的数据源Bean |
| | | @Autowired |
| | | private DataSource dataSource; |
| | | private final DataSource dataSource; |
| | | |
| | | @Bean |
| | | public SchedulerFactoryBean schedulerFactoryBean() { |