| | |
| | | import com.doumee.config.quartz.JobHandler; |
| | | import com.doumee.config.quartz.JobHandlerWithDisallowConcurrent; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.service.business.AreasService; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.quartz.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | @EnableScheduling |
| | | public class SchedulerProxy { |
| | | |
| | | @Autowired |
| | | private Scheduler scheduler; |
| | | |
| | | @Autowired |
| | | private AreasService areasService; |
| | | |
| | | @Scheduled(initialDelay = 0, fixedRate = 10000) |
| | | public void cacheAreaData(){ |
| | | areasService.cacheData(); |
| | | } |
| | | |
| | | /** |
| | | * 创建JOB |
| | | * |