package com.wms_main.quartz;

import com.wms_main.service.quartz_job.IJobService;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class JobStarter implements CommandLineRunner {
    private final IJobService jobService;
    @Override
    public void run(String... args) {
        // 启动定时任务
        jobService.initAllJobs();
    }
}
