package com.jkcredit.identity.task;

import com.jkcredit.identity.service.TokenService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author xusonglin
 * @version V1.0
 **/
@Component
@Slf4j
public class TokenTask {
    @Autowired
    TokenService tokenService;

    @Scheduled(cron = "0 0 0/1 * * ?", zone = "Asia/Shanghai")
    public void refreshToken() {
        tokenService.queryToken();
    }
}
