提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.modular.zsx.bs.job.quartz; |
懒 |
2 |
|
|
3 |
import org.quartz.Scheduler; |
|
4 |
import org.springframework.beans.factory.annotation.Autowired; |
|
5 |
import org.springframework.stereotype.Component; |
|
6 |
|
|
7 |
/** |
|
8 |
* @author fulin |
|
9 |
* @since 2023/6/14 15:25 |
|
10 |
* <p> |
|
11 |
* 此类仅仅作为引入静态调度器的工具类 {@link Scheduler} |
|
12 |
* </p> |
|
13 |
*/ |
|
14 |
@Component |
|
15 |
public class SchedulerStatic { |
|
16 |
|
|
17 |
private static Scheduler scheduler; |
|
18 |
|
|
19 |
@Autowired |
|
20 |
public SchedulerStatic(Scheduler scheduler) { |
|
21 |
SchedulerStatic.scheduler = scheduler; |
|
22 |
} |
|
23 |
|
|
24 |
public static Scheduler getScheduler() { |
|
25 |
return scheduler; |
|
26 |
} |
|
27 |
} |