server:
  port: 8086
spring:
  application:
    name: approval-flow-service
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://${DB_HOST:localhost}:${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+}
    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
  redis:
    host: ${REDIS_HOST:111.229.80.149}
    port: ${REDIS_PORT:6379}
    password: ${REDIS_PASSWORD:Y(@r5tGk9$Lp2}
    database: 0
    timeout: 3000ms
    lettuce:
      pool:
        max-active: 8
        max-wait: -1ms
        max-idle: 8
        min-idle: 0
  cloud:
    nacos:
      discovery:
        server-addr: ${NACOS_HOST:localhost}:${NACOS_PORT:8848}
        namespace: ${NACOS_NAMESPACE:public}
        group: ${NACOS_GROUP:ERP_GROUP}
      config:
        server-addr: ${NACOS_HOST:localhost}:${NACOS_PORT:8848}
        namespace: ${NACOS_NAMESPACE:public}
        group: ${NACOS_GROUP:ERP_GROUP}
        file-extension: yml
  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.approval.entity
  configuration:
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  global-config:
    db-config:
      id-type: auto
      logic-delete-field: deletedAt
      logic-delete-value: now()
      logic-not-delete-value: 'NULL'
logging:
  level:
    root: INFO
    com.erp.approval: DEBUG
  pattern:
    console: '%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n'
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: approval-flow-service
    export:
      prometheus:
        enabled: true
  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
knife4j:
  enable: true
  setting:
    language: zh_cn
  openapi:
    info:
      title: approval-flow-service API
      description: API Documentation
      version: 1.0.0
      contact:
        name: ERP Team
        email: dev@erpzbbh.cn

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