elastic-job-spring-boot-starter
elastic-job-spring-boot-starter copied to clipboard
注解定义任务 shardingTotalCount 值一致不变,用的默认值1
@ElasticJobConf(name = "MySimpleJob", cron = "0/10 * * * * ?", shardingTotalCount = 2, shardingItemParameters = "0=0,1=1", description = "简单任务")
System.out.println("分片参数:" + shardParamter);
分片参数 一直是1
找到问题原因了:overwrite = true 才可以覆盖新的配置,要不然一直取得第一次写入zk的 配置,哈哈