package org.jeecg.modules.ctop.job;

import org.jeecg.modules.ctop.service.IRefreshTokenService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

public class RefreshTokenJob implements Job {
    @Autowired
    private IRefreshTokenService refreshTokenService;

    /**
     * 刷新token
     *
     * @param jobExecutionContext
     * @throws JobExecutionException
     */
    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        Thread thread = new Thread() {
            @Override
            public void run() {
                refreshTokenService.getRefresh();
            }
        };
        thread.start();

    }
}
