zoukankan      html  css  js  c++  java
  • Jeecg代码搬砖圣地第七篇(定时任务)

    1.在系统监控---->定时任务中新增定时计划

     2.后台java方法

    @Service("smsSendTask")
    public class SmsSendTask implements Job{
        
        @Autowired
        private TSSmsServiceI tSSmsService; 
        
        /*@Scheduled(cron="0 0/1 * * * ?")*/
        public void run() {
            long start = System.currentTimeMillis();
            org.jeecgframework.core.util.LogUtil.info("===================推送消息定时任务开始===================");
            try {            
                tSSmsService.send();
            } catch (Exception e) {
                e.printStackTrace();
            }
            org.jeecgframework.core.util.LogUtil.info("===================推送消息定时任务结束===================");
            long end = System.currentTimeMillis();
            long times = end - start;
            org.jeecgframework.core.util.LogUtil.info("总耗时"+times+"毫秒");
        }
    
        @Override
        public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
            run();
        }
    }

    3.多数据源

  • 相关阅读:
    solr初步了解
    jieba初步了解
    情感计算emokit
    常用命令
    java跨域访问问题记录
    mysql 免安装版配置
    Android 图片缩放方法
    spring android http
    sql join 与where的区别
    android activitygroup 使用
  • 原文地址:https://www.cnblogs.com/xujiating/p/12105954.html
Copyright © 2011-2022 走看看