package com.ann.demo.job.config;

import com.ann.demo.job.SchedulerAllJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 定时任务
 *
 * @Author: LeiJiaXin
 * @Date: 2019/7/13 17:03
 */
//@Configuration
@Component
public class QuartzConfig implements CommandLineRunner {
    @Autowired
    public SchedulerAllJob scheduleJobs;

    @Override
    public void run(String... args) throws Exception {
        scheduleJobs.scheduleJobs();
        System.out.println(">>>>>>>>>>>>>>>定时任务开始执行<<<<<<<<<<<<<");
    }
}
