Commit f38aada29cd5b13ff85f36b337fc092c4ffa0b84
1 parent
168b63ca
简化 Quartz 配置
Showing
1 changed file
with
1 additions
and
9 deletions
src/main/resources/application.yaml
| @@ -44,25 +44,17 @@ spring: | @@ -44,25 +44,17 @@ spring: | ||
| 44 | 44 | ||
| 45 | # Quartz 配置项,对应 QuartzProperties 配置类 | 45 | # Quartz 配置项,对应 QuartzProperties 配置类 |
| 46 | quartz: | 46 | quartz: |
| 47 | - scheduler-name: clusteredScheduler # Scheduler 名字。默认为 schedulerName | 47 | + scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName |
| 48 | job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。 | 48 | job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。 |
| 49 | - auto-startup: true # Quartz 是否自动启动 | ||
| 50 | - startup-delay: 0 # 延迟 N 秒启动 | ||
| 51 | wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true | 49 | wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true |
| 52 | - overwrite-existing-jobs: false # 是否覆盖已有 Job 的配置 | ||
| 53 | properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档 | 50 | properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档 |
| 54 | org: | 51 | org: |
| 55 | quartz: | 52 | quartz: |
| 56 | # JobStore 相关配置 | 53 | # JobStore 相关配置 |
| 57 | jobStore: | 54 | jobStore: |
| 58 | - # 数据源名称 | ||
| 59 | -# dataSource: quartzDataSource # 使用的数据源 TODO 使用默认数据源 | ||
| 60 | class: org.quartz.impl.jdbcjobstore.JobStoreTX # JobStore 实现类 | 55 | class: org.quartz.impl.jdbcjobstore.JobStoreTX # JobStore 实现类 |
| 61 | - driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate | ||
| 62 | - tablePrefix: QRTZ_ # Quartz 表前缀 | ||
| 63 | isClustered: true # 是集群模式 | 56 | isClustered: true # 是集群模式 |
| 64 | clusterCheckinInterval: 1000 | 57 | clusterCheckinInterval: 1000 |
| 65 | - useProperties: false | ||
| 66 | # 线程池相关配置 | 58 | # 线程池相关配置 |
| 67 | threadPool: | 59 | threadPool: |
| 68 | threadCount: 25 # 线程池大小。默认为 10 。 | 60 | threadCount: 25 # 线程池大小。默认为 10 。 |