spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://${DB_HOST:111.229.80.149}:${DB_PORT:3306}/${DB_NAME:erp_db}?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: ${DB_USERNAME:root}
    password: ${DB_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
  application:
    name: reconciliation-service
  zipkin:
    base-url: ${ZIPKIN_SERVER_URL:http://localhost:9411}
    sender:
      type: web
  sleuth:
    sampler:
      probability: 1.0
      rate: 100
    trace-id128: true
mybatis-plus:
  mapper-locations: classpath*:/mapper/**/*.xml
  type-aliases-package: com.erp.reconciliation.entity
  global-config:
    db-config:
      id-type: auto
      logic-delete-field: deletedAt
      logic-delete-value: '9999-12-31 23:59:59'
      logic-not-delete-value: null
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
feign:
  client:
    config:
      default:
        connect-timeout: 5000
        read-timeout: 10000
        logger-level: basic
  compression:
    request:
      enabled: true
    response:
      enabled: true
spring.retry:
  enabled: true
reconciliation:
  task:
    core-pool-size: 5
    max-pool-size: 10
    queue-capacity: 100
  reconciliation:
    batch-size: 100
    daily-cron: 0 0 2 * * ?
    weekly-cron: 0 0 3 * * MON
    monthly-cron: 0 0 4 1 * ?
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
knife4j:
  enable: true
  setting:
    language: zh_cn
  openapi:
    info:
      title: reconciliation-service API
      description: API Documentation
      version: 1.0.0
      contact:
        name: ERP Team
        email: dev@erpzbbh.cn
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:
    tags:
      application: reconciliation-service
    export:
      prometheus:
        enabled: true
  health:
    livenessstate:
      enabled: true
    readinessstate:
      enabled: true

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