spring:
  application:
    name: finance-service
  profiles:
    active: ${PROFILE:dev}
  cloud:
    nacos:
      config:
        server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
        namespace: ${NACOS_NAMESPACE:public}
        group: ${NACOS_GROUP:DEFAULT_GROUP}
        file-extension: yaml
        shared-configs:
        - data-id: common-config.yaml
          group: DEFAULT_GROUP
          refresh: true
        - data-id: datasource-config.yaml
          group: DEFAULT_GROUP
          refresh: true
        - data-id: redis-config.yaml
          group: DEFAULT_GROUP
          refresh: true
        extension-configs:
        - data-id: finance-service-config.yaml
          group: DEFAULT_GROUP
          refresh: true
      discovery:
        server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
        namespace: ${NACOS_NAMESPACE:public}
        group: ${NACOS_GROUP:DEFAULT_GROUP}
  config:
    import:
    - optional:nacos:common-config.yaml
    - optional:nacos:datasource-config.yaml
    - optional:nacos:redis-config.yaml
    - optional:nacos:finance-service-config.yaml
  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.finance.entity
  configuration:
    map-underscore-to-camel-case: true
    log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
server:
  port: ${SERVER_PORT:8007}
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: finance-service
    export:
      prometheus:
        enabled: true
  health:
    livenessstate:
      enabled: true
    readinessstate:
      enabled: true
logging:
  level:
    com.erp.finance: INFO
    org.springframework.cloud.openfeign: DEBUG
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: finance-service API
      description: API Documentation
      version: 1.0.0
      contact:
        name: ERP Team
        email: dev@erpzbbh.cn

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