spring:
  profiles:
    active: @profiles.active@
  application:
    name: bunny-service
  servlet:
    multipart:
      max-file-size: 6MB

  datasource:
    type: com.zaxxer.hikari.HikariDataSource
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://${bunny.master.host}:${bunny.master.port}/${bunny.master.database}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
    username: ${bunny.master.username}
    password: ${bunny.master.password}
  #    dynamic:
  #      primary: master #设置默认的数据源或者数据源组,默认值即为master
  #      strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
  #      grace-destroy: false #是否优雅关闭数据源，默认为false，设置为true时，关闭数据源时如果数据源中还存在活跃连接，至多等待10s后强制关闭
  #      datasource:
  #        master:
  #          type: com.zaxxer.hikari.HikariDataSource
  #          driver-class-name: com.mysql.cj.jdbc.Driver
  #          url: jdbc:mysql://${bunny.master.host}:${bunny.master.port}/${bunny.master.database}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
  #          username: ${bunny.master.username}
  #          password: ${bunny.master.password}
  #      aop:
  #        enabled: true

  data:
    redis:
      host: ${bunny.redis.host}
      port: ${bunny.redis.port}
      database: ${bunny.redis.database}
      password: ${bunny.redis.password}
      lettuce:
        pool:
          max-active: 20 #最大连接数
          max-wait: -1    #最大阻塞等待时间(负数表示没限制)
          max-idle: 5    #最大空闲
          min-idle: 0     #最小空闲

  quartz:
    job-store-type: jdbc
    jdbc:
      initialize-schema: never
    auto-startup: true
    wait-for-jobs-to-complete-on-shutdown: true
    overwrite-existing-jobs: false
    scheduler-name: quartzScheduler
    properties:
      org:
        quartz:
          scheduler:
            # 默认
            instanceName: quartzScheduler
            # 如果使用集群，instanceId必须唯一，设置成AUTO
            instanceId: AUTO
          jobStore:
            # 存储方式使用JobStoreTX 也就是数据库 LocalDataSourceJobStore
            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
            # 表名前缀
            tablePrefix: QRTZ_
            useProperties: false
            misfireThreshold: 5000
          threadPool:
            class: org.quartz.simpl.SimpleThreadPool
            threadCount: 20
            threadPriority: 5
            threadsInheritContextClassLoaderOfInitializingThread: true

  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8

mybatis-plus:
  mapper-locations: classpath:mapper/**/*.xml
  global-config:
    db-config:
      logic-delete-field: isDeleted
  configuration:
    map-underscore-to-camel-case: true

management:
  endpoints:
    web:
      exposure:
        include: "*"
      base-path: /admin/actuator
  info:
    env:
      enabled: true
    java:
      enabled: true
    os:
      enabled: true

  endpoint:
    health:
      show-details: always