SpringBoot整合Quartz持久化时,数据源报错。


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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM