| | |
| | | |
| | | // 生成激活码 |
| | | public static void main(String[] args) { |
| | | String timeStr = "2020-08-01 17:15:35"; |
| | | String timeStr = "2020-08-01 16:48:35"; |
| | | Date exprTime = DateUtils.convert(timeStr); |
| | | String code = AesUtils.encrypt(DateUtils.convert(exprTime, DateUtils.yyyyMMddHHmmss), SystemProperties.SALT); |
| | | System.out.println("激活码:"+code); |
| | |
| | | @Component |
| | | public class ActivateScheduler { |
| | | |
| | | @Scheduled(cron = "0/1 * 8 * * ? ") |
| | | // @Scheduled(cron = "0/1 * 8 * * ? ") // 每天8点 |
| | | @Scheduled(cron = "* 0/1 * * * ? ") // 每分钟 |
| | | @PostConstruct |
| | | private void execute(){ |
| | | // 获取激活码 |