nested exception is org.quartz.SchedulerConfigException: DataSource name not set
之前配置的是:org.quartz.impl.jdbcjobstore.JobStoreTX
quartz:
job-store-type: jdbc
jdbc:
initialize-schema: never
properties:
org:
quartz:
scheduler:
instanceName: MyScheduler
instanceId: Auto
jobStore:
class: org.springframework.scheduling.quartz.LocalDataSourceJobStore # springboot>2.5.6后使用这个。
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate #StdJDBCDelegate说明支持集群
tablePrefix: QRTZ_
isClustered: true
clusterCheckinInterval: 1000
useProperties: false
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 20
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true