package com.yonge.cooleshow.biz.dal.service;

import com.yonge.cooleshow.biz.dal.wordfilter.WordContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class ScheduleManager{

    @Autowired
    private WordContext wordContext;

    @Scheduled(cron = "0 0/10 * * * ?")
    public void refreshBlackList() {
        if (wordContext.isInit())
            wordContext.mapInit();
    }
}
