server:
  port: 8087
spring:
  application:
    name: system-tool-service
  datasource:
    url: jdbc:mysql://${DB_HOST:111.229.80.149}:${DB_PORT:3306}/${DB_NAME:erp_db}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
    username: ${DB_USER:root}
    password: ${DB_PASSWORD:nihao588+}
    driver-class-name: com.mysql.cj.jdbc.Driver
    hikari:
      maximum-pool-size: 20
      minimum-idle: 5
      idle-timeout: 300000
      connection-timeout: 20000
      max-lifetime: 1200000
  jpa:
    hibernate:
      ddl-auto: validate
    show-sql: false
    properties:
      hibernate:
        dialect: org.hibernate.dialect.MySQLDialect
        format_sql: true
  data:
    redis:
      host: ${REDIS_HOST:111.229.80.149}
      port: ${REDIS_PORT:6379}
      password: ${REDIS_PASSWORD:Y(@r5tGk9$Lp2}
      lettuce:
        pool:
          max-active: 20
          max-idle: 10
          min-idle: 5
  zipkin:
    base-url: ${ZIPKIN_SERVER_URL:http://localhost:9411}
    sender:
      type: web
  sleuth:
    sampler:
      probability: 1.0
      rate: 100
    trace-id128: true
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: system-tool-service
    export:
      prometheus:
        enabled: true
  health:
    livenessstate:
      enabled: true
    readinessstate:
      enabled: true
notification:
  dingtalk:
    enabled: ${DINGTALK_ENABLED:false}
    webhook: ${DINGTALK_WEBHOOK:}
logging:
  level:
    com.erp.systemtool: INFO
    org.springframework: WARN
    org.hibernate: WARN
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: system-tool-service API
      description: API Documentation
      version: 1.0.0
      contact:
        name: ERP Team
        email: dev@erpzbbh.cn

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