mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 12:18:42 +08:00 
			
		
		
		
	简化 Quartz 配置
This commit is contained in:
		@@ -44,25 +44,17 @@ spring:
 | 
			
		||||
 | 
			
		||||
  # Quartz 配置项,对应 QuartzProperties 配置类
 | 
			
		||||
  quartz:
 | 
			
		||||
    scheduler-name: clusteredScheduler # Scheduler 名字。默认为 schedulerName
 | 
			
		||||
    scheduler-name: schedulerName # Scheduler 名字。默认为 schedulerName
 | 
			
		||||
    job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存,可选 jdbc 使用数据库。
 | 
			
		||||
    auto-startup: true # Quartz 是否自动启动
 | 
			
		||||
    startup-delay: 0 # 延迟 N 秒启动
 | 
			
		||||
    wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时,是否等待定时任务执行完成。默认为 false ,建议设置为 true
 | 
			
		||||
    overwrite-existing-jobs: false # 是否覆盖已有 Job 的配置
 | 
			
		||||
    properties: # 添加 Quartz Scheduler 附加属性,更多可以看 http://www.quartz-scheduler.org/documentation/2.4.0-SNAPSHOT/configuration.html 文档
 | 
			
		||||
      org:
 | 
			
		||||
        quartz:
 | 
			
		||||
          # JobStore 相关配置
 | 
			
		||||
          jobStore:
 | 
			
		||||
            # 数据源名称
 | 
			
		||||
#            dataSource: quartzDataSource # 使用的数据源 TODO 使用默认数据源
 | 
			
		||||
            class: org.quartz.impl.jdbcjobstore.JobStoreTX # JobStore 实现类
 | 
			
		||||
            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
 | 
			
		||||
            tablePrefix: QRTZ_ # Quartz 表前缀
 | 
			
		||||
            isClustered: true # 是集群模式
 | 
			
		||||
            clusterCheckinInterval: 1000
 | 
			
		||||
            useProperties: false
 | 
			
		||||
          # 线程池相关配置
 | 
			
		||||
          threadPool:
 | 
			
		||||
            threadCount: 25 # 线程池大小。默认为 10 。
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user