# =============================================
# 安全评价业务服务 - 公共配置（所有环境共享）
# =============================================
application:
  name: jjb-saas-cq-anquan
  version:
  gateway: cqanquan
  cn-name: 重庆安全评价


server:
  port: 8095
  servlet:
    context-path: /safety-eval

spring:
  application:
    name: safety-eval-service
  mvc:
    pathmatch:
      matching-strategy: ant_path_matcher
  profiles:
    active: local
  config:
    import:
      - classpath:sdk-prod2.yml
  servlet:
    multipart:
      enabled: true
      max-file-size: 100MB
      max-request-size: 500MB


# ---------- MyBatis Plus ----------
mybatis-plus:
  mapper-locations: classpath*:mapper/**/*.xml
  global-config:
    db-config:
      id-type: assign_id
      logic-delete-field: deleteEnum
      logic-delete-value: "true"
      logic-not-delete-value: "false"
  configuration:
    map-underscore-to-camel-case: true

# ---------- 文件存储（阿里云 OSS） ----------
dromara:
  x-file-storage:
    default-platform: aliyun-oss-1
    thumbnail-suffix: ""  # 不使用缩略图
    aliyun-oss:
      - platform: aliyun-oss-1
        enable-storage: true
        access-key: LTAI5tFerUgBCLEbXtinDD6d
        secret-key: XyGVNV2RvW8U3ceoJDiy9A9oLvCGYp
        end-point: oss-cn-hangzhou.aliyuncs.com
        bucket-name: test-dragon-yf-pub
        domain: https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/
        base-path: jjb/

# ---------- Dubbo（环境无关的公共部分，各profile覆盖地址/端口） ----------
dubbo:
  application:
    name: safety-eval-service
    service-discovery:
      migration: FORCE_INTERFACE
  registry:
    timeout: 20000
    check: false
    filter: providerContextFilter
  scan:
    base-packages: org.qinan.safetyeval
  protocol:
    name: dubbo
  consumer:
    timeout: 20000
    check: false
    filter: consumerContextFilter

safety-eval:
  gbs-user-sync:
    fail-fast: true
    user-facade-url: ${GBS_USER_FACADE_URL:}
  security:
    # Exact paths that can be accessed without authentication.
    permit-all-paths:
      - /v2/api-docs
      - /v3/api-docs
    # A prefix automatically matches itself and all child paths.
    permit-all-prefixes:
      - /swagger-ui
      - /swagger-resources
      - /webjars
      - /public
      - /test
      - /tmp
      - /mock
    # These rules take priority over permit-all rules when paths overlap.
    authenticated-paths: []
    authenticated-prefixes: []
  public-api:
    system-user-id: ${PUBLIC_API_SYSTEM_USER_ID:0}
    system-user-name: ${PUBLIC_API_SYSTEM_USER_NAME:system}
    tenant-id: ${PUBLIC_API_TENANT_ID:0}
    org-id: ${PUBLIC_API_ORG_ID:0}
  attachment:
    default-url: https://s1.aigei.com/prevfiles/6f2754563be2491bad7c957904cd7d2a.jpg?e=2051020800&token=P7S2Xpzfz11vAkASLTkfHN7Fw-oOZBecqeJaxypL:CR60zg7VKDp-jUWyYls_rdvyQMM=
