# 本地开发配置模板（方案 C）
# 使用方式：
# 1. 复制为 safety-eval-start/src/main/resources/application-local.yml
# 2. IDEA Active profiles 填 local
# 3. 100 上已部署 dubbo-dev-proxy（见 docs/gbs/本地开发Dubbo代理方案C.md）
#
# 注意：含环境密码，勿提交到 Git

spring:
  cloud:
    nacos:
      config:
        server-addr: 192.168.20.100:30290
        namespace: jjb-dragon
        file-extension: yml
      discovery:
        # 本地开发不要注册到线上同名服务，避免污染 jjb-dragon
        enabled: false

  datasource:
    url: jdbc:mysql://192.168.20.100:33080/safety-eval-service?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: root
    password: Mysql@zcloud33080

  redis:
    host: 192.168.20.100
    port: 6379
    password: Zcloud@zcloud2026

server:
  port: 8095

# 覆盖 Nacos config-common 中的 external 网关地址，本地走 100 NodePort
gateway:
  url: http://192.168.20.100:30140
  baseUrl: http://192.168.20.100:30140

dragon:
  gateway:
    baseurl: http://192.168.20.100:30140

dubbo:
  consumer:
    check: false
    timeout: 60000
  registry:
    # 仍可从 Nacos 拉 metadata，但 Consumer 端对关键接口建议显式 url
    check: false

safety-eval:
  gbs-user-sync:
    fail-fast: false
    # UserFacade 在 jjb-saas-system，方案 C 代理端口 32080
    user-facade-url: ${GBS_USER_FACADE_URL:dubbo://192.168.20.100:32080}
  dubbo:
    message-facade-url: ${GBS_MESSAGE_FACADE_URL:dubbo://192.168.20.100:32084}
  security:
    permit-all-paths:
      - /v2/api-docs
      - /v3/api-docs
    permit-all-prefixes:
      - /swagger-ui
      - /swagger-resources
      - /webjars
      - /public/org-personnel
      - /test
      - /tmp
      - /mock
      - /org-info
      - /org-department
      - /org-position
      - /org-qualification
      - /org-personnel
      - /org-personnel-cert
      - /org-personnel-change
      - /org-resign-apply
      - /org-equipment
      - /qual-filing
      - /qual-filing-change
      - /qual-filing-change-detail
      - /qual-filing-commitment
      - /qual-filing-equipment
      - /qual-filing-material
      - /qual-filing-personnel
      - /qual-filing-personnel-cert
      - /file-storage
      - /file
  public-api:
    system-user-id: 1
    system-user-name: local-dev
    tenant-id: 1001
    org-id: 1

logging:
  level:
    org.qinan.safetyeval: debug
