quartz2oracle改成pg

spring.quartz.job-store-type=jdbc
spring.quartz.jdbc.initialize-schema=always
spring.quartz.wait-for-jobs-to-complete-on-shutdown=true
spring.quartz.overwrite-existing-jobs=true
spring.quartz.properties.org.quartz.scheduler.instanceName=scheduler
spring.quartz.properties.org.quartz.scheduler.instanceId=AUTO
spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
spring.quartz.properties.org.quartz.jobStore.tablePrefix=QRTZ_
spring.quartz.properties.org.quartz.jobStore.dataSource=quartzds;
#spring.quartz.properties.org.quartz.dataSource.quartzds.URL=jdbc:oracle:thin:@127.0.0.1:1521/demo_dba
spring.quartz.properties.org.quartz.dataSource.quartzds.URL=jdbc:postgresql://127.0.0.1:5432/bcop?currentSchema=conf
spring.quartz.properties.org.quartz.dataSource.quartzds.user=bcop
spring.quartz.properties.org.quartz.dataSource.quartzds.password=123456
spring.quartz.properties.org.quartz.dataSource.quartzds.driver=org.postgresql.Driver
spring.quartz.properties.org.quartz.dataSource.quartzds.provider=hikaricp

spring.quartz.properties.org.quartz.jobStore.useProperties=false
spring.quartz.properties.org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
spring.quartz.properties.org.quartz.threadPool.threadCount=30
spring.quartz.properties.org.quartz.threadPool.threadPriority=5
spring.quartz.properties.org.quartz.threadPoolthreadsInheritContextClassLoaderOfInitializingThread=true

确保 PostgreSQL 数据库中正确初始化了 Quartz 表。如果 spring.quartz.jdbc.initialize-schema=always(自动创建表) 已经生成了表,建议检查表结构是否符合 Quartz 的要求,尤其是与 Quartz 官方文档提供的 PostgreSQL 建表脚本对比。
spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
org.quartz.impl.jdbcjobstore.StdJDBCDelegate 作为 JDBC 驱动代理类。这个类适合处理基本的数据类型。如果你的 JobDataMap 存储了序列化对象,可能会导致存储问题。你可以尝试使用 org.quartz.impl.jdbcjobstore.PostgreSQLDelegate 来替代,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值