File tree Expand file tree Collapse file tree 6 files changed +6
-4
lines changed
java/com/didispace/chapter74 Expand file tree Collapse file tree 6 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 8484- [ Spring Boot 2.x基础教程:使用@Scheduled 实现定时任务] ( https://blog.didispace.com/spring-boot-learning-2-7-1 )
8585- [ Spring Boot 2.x基础教程:使用Elastic Job实现定时任务] ( https://blog.didispace.com/spring-boot-learning-2-7-2 )
8686- [ Spring Boot 2.x基础教程:使用Elastic Job的分片配置] ( https://blog.didispace.com/spring-boot-learning-2-7-3 )
87-
87+ - [ Spring Boot 2.x基础教程:使用Elastic Job的namespace防止任务名冲突 ] ( https://blog.didispace.com/spring-boot-learning-2-7-4 )
8888
8989### 常见问题
9090
Original file line number Diff line number Diff line change 8585- [ Spring Boot 2.x基础教程:使用@Scheduled 实现定时任务] ( https://blog.didispace.com/spring-boot-learning-2-7-1 )
8686- [ Spring Boot 2.x基础教程:使用Elastic Job实现定时任务] ( https://blog.didispace.com/spring-boot-learning-2-7-2 )
8787- [ Spring Boot 2.x基础教程:使用Elastic Job的分片配置] ( https://blog.didispace.com/spring-boot-learning-2-7-3 )
88+ - [ Spring Boot 2.x基础教程:使用Elastic Job的namespace防止任务名冲突] ( https://blog.didispace.com/spring-boot-learning-2-7-4 )
8889
8990### 常见问题
9091
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ public class MySimpleJob implements SimpleJob {
1212 @ Override
1313 public void execute (ShardingContext context ) {
1414 log .info ("MySimpleJob start : didispace.com {}" , System .currentTimeMillis ());
15- throw new RuntimeException ("模拟任务出现异常" );
1615 }
1716
1817}
Original file line number Diff line number Diff line change 1+ spring.application.name =chapter74
2+
13elasticjob.reg-center.server-lists =localhost:2181
2- elasticjob.reg-center.namespace =didispace
4+ elasticjob.reg-center.namespace =${spring.application.name}
35
46elasticjob.jobs.my-simple-job.elastic-job-class =com.didispace.chapter74.MySimpleJob
57elasticjob.jobs.my-simple-job.cron =0/5 * * * * ?
Original file line number Diff line number Diff line change 7272 <module >chapter7-1</module > <!-- 7-1 使用@Scheduled实现定时任务 -->
7373 <module >chapter7-2</module > <!-- 7-2 使用Elastic Job实现定时任务 -->
7474 <module >chapter7-3</module > <!-- 7-3 使用Elastic Job的分片配置 -->
75- <module >chapter7-4</module > <!-- 7-4 Elastic Job的错误处理策略 -->
75+ <module >chapter7-4</module > <!-- 7-4 使用Elastic Job的namespace防止任务名冲突 -->
7676 <!-- 7-5 简单异步任务 -->
7777
7878 </modules >
You can’t perform that action at this time.
0 commit comments