application.yaml 2.9 KB
server:
  port: 8011

dispatch:
  cron:
    expr: 0 */30 8-18 * * ?
    next-day-limit: 2

spring:
  application:
    name: project-dispatch
    jackson:
      default-property-inclusion: NON_NULL
      #    time-zone: GMT+8
      date-format: yyyy-MM-dd HH:mm:ss
  cloud:
    nacos:
      discovery:
        server-addr: nacos-server:8848
        group: project
      config:
        server-addr: nacos-server:8848
        group: project
        file-extension: yaml
        import-check:
          # no config file
          enabled: false
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://10.10.0.116:32306/saas_aftersale_test?serverTimezone=Asia/Shanghai
    username: boxi
    password: boxi_dev_0725
    type: com.alibaba.druid.pool.DruidDataSource

  # quartz 配置
  quartz:
    # 应用关闭时,是否等待定时任务执行完成。默认为 false,建议设置为 true
    wait-for-jobs-to-complete-on-shutdown: true
    # 是否覆盖已有 Job 的配置,注意为false时,修改已存在的任务调度cron,周期不生效
    overwrite-existing-jobs: true
    #相关属性配置
    properties:
      org:
        quartz:
          scheduler:
            #调度标识名 集群中每一个实例都必须使用相同的名称
            instanceName: Scheduler
            #ID设置为自动获取 每一个必须不同
            instanceId: AUTO
            makeSchedulerThreadDaemon: false
          jobStore:
            #class: org.quartz.impl.jdbcjobstore.JobStoreTX
            #spring-boot-starter-quartz V2.5.7及以上
            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
            #表的前缀,默认QRTZ_
            tablePrefix: QRTZ_
            #是否加入集群
            isClustered: true
            #调度实例失效的检查时间间隔
            clusterCheckinInterval: 10000
            useProperties: false
            misfireThreshold: 600000
          threadPool:
            class: org.quartz.simpl.SimpleThreadPool
            # 指定在线程池里面创建的线程是否是守护线程
            makeThreadsDaemons: false
            #指定线程数,至少为1(无默认值,一般设置为1-100)
            threadCount: 10
            #设置线程的优先级(最大为java.lang.Thread.MAX_PRIORITY 10,最小为Thread.MIN_PRIORITY 1,默认为5)
            threadPriority: 5
            threadsInheritContextClassLoaderOfInitializingThread: true
    #数据库方式
    job-store-type: jdbc
    #初始化表结构,初始化:always,再次重启改为 embedded
    jdbc:
      initialize-schema: embedded

seata:
  application-id: ${spring.application.name}
  tx-service-group: ${spring.application.name}-group
  service:
    vgroup-mapping:
      project-dispatch-group: default
    grouplist:
      default: seata-server:8091