# 数据源配置
spring:
  redis:
    database: 1
    host: 192.168.234.101
    port: 6379
    password: 1234@abcd   # 密码（默认为空）
    timeout: 6000ms       # 连接超时时长（毫秒）
    lettuce:
      pool:
        max-active: 1000  # 连接池最大连接数（使用负值表示没有限制）
        max-wait: -1ms    # 连接池最大阻塞等待时间（使用负值表示没有限制）
        max-idle: 10      # 连接池中的最大空闲连接
        min-idle: 5       # 连接池中的最小空闲连接
  datasource:
    mysql:
      driver-class-name: com.p6spy.engine.spy.P6SpyDriver
      url: jdbc:p6spy:mysql://192.168.234.100:3306/data_cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
      username: root
      password: 1234@abcd
    quartz:
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://192.168.234.100:3306/data_cloud_quartz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
      username: root
      password: 1234@abcd
    type: com.zaxxer.hikari.HikariDataSource
    hikari:
      auto-commit: false
      connection-timeout: 30000
      idle-timeout: 25000
      login-timeout: 5
      max-lifetime: 30000
      read-only: false
      validation-timeout: 3000
      maximum-pool-size: 15
      minimum-idle: 5
      pool-name: DataxHikariCP
      connection-test-query: SELECT 1 FROM DUAL
      data-source-properties:
        cachePrepStmts: true
        prepStmtCacheSize: 250
        prepStmtCacheSqlLimit: 2048
        useServerPrepStmts: true
        useLocalSessionState: true
        rewriteBatchedStatements: true
        cacheResultSetMetadata: true
        cacheServerConfiguration: true
        elideSetAutoCommits: true
        maintainTimeStats: false
  quartz:
    job-store-type: jdbc # Job 存储器类型。默认为 memory 表示内存，可选 jdbc 使用数据库。
    auto-startup: true # Quartz 是否自动启动
    startup-delay: 0 # 延迟 N 秒启动
    wait-for-jobs-to-complete-on-shutdown: true # 应用关闭时，是否等待定时任务执行完成。默认为 false ，建议设置为 true
    overwrite-existing-jobs: false # 是否覆盖已有 Job 的配置
    jdbc: # 使用 JDBC 的 JobStore 的时候，JDBC 的配置
      initialize-schema: never # 是否自动使用 SQL 初始化 Quartz 表结构。这里设置成 never ，我们手动创建表结构。
    properties:
      org:
        quartz:
          scheduler:
            instancName: clusteredScheduler
            instanceId: AUTO
          jobStore:
            class: org.quartz.impl.jdbcjobstore.JobStoreTX
            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate #StdJDBCDelegate说明支持集群
            dataSource: quartzDataSource
            tablePrefix: QRTZ_
            isClustered: true
            clusterCheckinInterval: 1000
            useProperties: false
            misfireThreshold: 5000 # 设置临界时间为5秒
          threadPool:
            class: org.quartz.simpl.SimpleThreadPool
            threadCount: 20
            threadPriority: 5
            threadsInheritContextClassLoaderOfInitializingThread: true

mybatis-plus:
  mapper-locations: classpath*:mapper/*Mapper.xml
  type-aliases-package: cn.datax.service.quartz.api.entity
  global-config:
    db-config:
      id-type: ASSIGN_ID
    banner: false
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
    call-setters-on-nulls: true
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

# spring security 配置
security:
  oauth2:
    client:
      access-token-uri: http://localhost:8612/auth/oauth/token
      user-authorization-uri: http://localhost:8612/auth/oauth/authorize
      client-id: datax
      client-secret: 123456
      scope: all
    resource:
      loadBalanced: true
      token-info-uri: http://localhost:8612/auth/oauth/check_token