美文网首页
Quartz有关配置

Quartz有关配置

作者: 奶盐味小圆饼 | 来源:发表于2020-06-11 18:05 被阅读0次

在调用接口新增数据的时候,表的实体类entiey的id应该加上@TableId,指定类型为自增

 @TableId(
            value = "id",
            type = IdType.AUTO
    )
    private Long id;
application.yml文件配置
  quartz:
    job-store-type: jdbc
    jdbc:
      initialize-schema: embedded
    properties:
      org:
        quartz:
          scheduler:
            instanceName: clusteredScheduler
            instanceId: AUTO
          jobStore:
            class: org.quartz.impl.jdbcjobstore.JobStoreTX
            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
            tablePrefix: qrtz_
            isClustered: true
            clusterCheckinInterval: 10000
            useProperties: false
          threadPool:
            class: org.quartz.simpl.SimpleThreadPool
            threadCount: 10
            threadPriority: 5
            threadsInheritContextClassLoaderOfInitializingThread: true

相关文章

网友评论

      本文标题:Quartz有关配置

      本文链接:https://www.haomeiwen.com/subject/fmdbtktx.html