server:
  port: 8088
spring:
  application:
    name: scheduled-task-service
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://111.229.80.149:3306/erp_task?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false
    username: root
    password: nihao588+
    type: com.alibaba.druid.pool.DruidDataSource
    druid:
      initial-size: 5
      min-idle: 5
      max-active: 20
      max-wait: 60000
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 300000
      validation-query: SELECT 1
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
  jpa:
    hibernate:
      ddl-auto: update
    show-sql: false
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MySQL8Dialect
        format_sql: true
    open-in-view: false
  data:
    redis:
      host: 111.229.80.149
      port: 6379
      password: Y(@r5tGk9$Lp2
      database: 0
      timeout: 10000
      lettuce:
        pool:
          max-active: 8
          max-idle: 8
          min-idle: 2
          max-wait: -1ms
  quartz:
    job-store-type: jdbc
    jdbc:
      initialize-schema: always
    properties:
      org:
        quartz:
          scheduler:
            instanceName: ScheduledTaskScheduler
            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
  mail:
    host: smtp.example.com
    port: 25
    username: noreply@example.com
    password: password
    properties:
      mail:
        smtp:
          auth: true
          starttls:
            enable: true
  zipkin:
    base-url: ${ZIPKIN_SERVER_URL:http://localhost:9411}
    sender:
      type: web
  sleuth:
    sampler:
      probability: 1.0
      rate: 100
    trace-id128: true
task:
  retry:
    max-retries: 3
    retry-interval: 60000
    multiplier: 2.0
    max-retry-interval: 3600000
    exponential-backoff: true
  alert:
    enabled: true
    level: ERROR
    alert-after-failures: 1
    silence-minutes: 30
    email:
      enabled: false
      host: smtp.example.com
      port: 25
      username: noreply@example.com
      password: password
      from: noreply@example.com
      use-ssl: false
    sms:
      enabled: false
      endpoint: https://sms.example.com/api
      api-key: your-api-key
    webhook:
      enabled: false
      url: https://webhook.example.com/alert
      secret: your-secret
management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus,caches,beans,env,loggers,threaddump,heapdump,scheduledtasks
        base-path: /actuator
  endpoint:
    health:
      show-details: always
      probes:
        enabled: true
    prometheus:
      enabled: true
    info:
      enabled: true
  metrics:
    export:
      prometheus:
        enabled: true
    tags:
      application: scheduled-task-service
  health:
    livenessstate:
      enabled: true
    readinessstate:
      enabled: true
springdoc:
  api-docs:
    enabled: true
    path: /v3/api-docs
  swagger-ui:
    enabled: true
    path: /swagger-ui.html
    tags-sorter: alpha
    operations-sorter: alpha
    display-request-duration: true
logging:
  level:
    root: INFO
    com.erp.task: DEBUG
    org.quartz: INFO
    org.springframework: INFO
  pattern:
    console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n'
knife4j:
  enable: true
  setting:
    language: zh_cn
  openapi:
    info:
      title: scheduled-task-service API
      description: API Documentation
      version: 1.0.0
      contact:
        name: ERP Team
        email: dev@erpzbbh.cn

# 公共OpenAPI配置（来自 common-config）
erp:
  openapi:
    title: scheduled-task-service API
    description: scheduled-task-service 服务API文档
    version: 1.0.0
    service-url: ${scheduled-task-service_SERVICE_URL:https://api.erpzbbh.cn}
