package com.fzzy.web; import com.fzzy.api.service.ApiCommonService; import com.fzzy.api.service.ApiTriggerService; import com.fzzy.api.service.GbCheckItemService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Service; /** * 配置系统级别的项目启动初始化信息 * * @author vince */ @Service @Slf4j @Order(value = 1) public class SystemRunner implements CommandLineRunner { @Autowired private ApiTriggerService apiTriggerService; @Autowired private GbCheckItemService checkItemService; @Autowired private ApiCommonService commonService; @Override public void run(String... args) throws Exception { log.info("系统启动刷新系统缓存!"); apiTriggerService.flushCache(); checkItemService.flushCache(); commonService.flushConfCache(); commonService.flushApi1105Cache(); } }