package com.cm.common.token.app;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: AppTokenTask
 * @Description: app token 定时任务
 * @Author: WangGeng
 * @Date: 2019-08-10 14:50
 * @Version: 1.0
 **/
@Component
@Configuration
@EnableScheduling
public class AppTokenTask {

    @Scheduled(cron = "0 0/1 * * * ?")
    public void clearAppTokenUser() {
        AppTokenManager.getInstance().clearTimeoutToken();
    }

}
