| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class GetDingToken implements ApplicationListener<ContextRefreshedEvent> { |
| | | public class GetDingToken implements ApplicationListener<ContextRefreshedEvent> { |
| | | private static GetClient getTokenClient; |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | |
| | | @Value("${spring.profiles.active}") |
| | | private String env; |
| | | |
| | | @Scheduled(cron ="0 0/2 * * * ? ") |
| | | @Scheduled(cron ="0 0/2 * * * ?") |
| | | // @Scheduled(cron = "0/1 * * * * ?") // 每秒执行 |
| | | public void runAction() { |
| | | // System.out.println("环境:" + env); |