elasticJob 自定义任务参数

页面上配置

代码中获取

        // 自定义参数 当前时间
        if (null != shardingContext) {
            String jobParam = shardingContext.getJobParameter();
            if (StringUtils.isNotEmpty(jobParam)) {
               Date now = DateUtil.formatDate(jobParam);
            }
        }

 

posted on 2021-12-21 16:16  胡子就不刮  阅读(297)  评论(0)    收藏  举报

导航