# =============================================
# 开发/测试环境配置 (Dev)
# 激活方式: -Dspring.profiles.active=dev
# =============================================

spring:
  config:
    import:
      - optional:nacos:common.yml?refreshEnabled=true
      - optional:nacos:safety-eval-service.yml
  cloud:
    nacos:
      discovery:
        server-addr: 192.168.20.100:30290
        namespace: jjb-dragon
      config:
        server-addr: 192.168.20.100:30290
        namespace: jjb-dragon
        file-extension: yml
        shared-configs:
          - data-id: config-spring.yml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: config-actuator.yml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: config-cache.yml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: config-sdk.yml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: config-sdk-server.yml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: config-log.yml
            group: DEFAULT_GROUP
            refresh: true
          - data-id: config-job.yml
            group: DEFAULT_GROUP
            refresh: false
          - data-id: config-mq.yml
            group: DEFAULT_GROUP
            refresh: false
          - data-id: config-flyway.yml
            group: DEFAULT_GROUP
            refresh: false
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://192.168.20.100:33080/jjb_saas_safety_eval?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
    username: root
    password: Mysql@zcloud33080
  redis:
    host: 192.168.20.100
    port: 6379
    password: Zcloud@zcloud2026
    database: 0
    timeout: 10000
    lettuce:
      pool:
        max-active: 8
        max-idle: 8
        min-idle: 0
        max-wait: -1

dubbo:
  registry:
    address: nacos://192.168.20.100:30290
    parameters:
      namespace: jjb-dragon-facade
  protocol:
    port: 20895

dragon:
  gateway:
    baseurl: http://192.168.20.100
    res: http://192.168.20.100
    is-system: 'false'
    system-url: http://jjb-saas-system

mybatis-plus:
  configuration:
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

logging:
  level:
    org.qinan.safetyeval: debug

# 本地联调：企业信息管理接口免鉴权（覆盖 application.yml 中 security 配置）
safety-eval:
  gbs-user-sync:
    fail-fast: true
    user-facade-url: ${GBS_USER_FACADE_URL:dubbo://192.168.20.100:32080}
  security:
    permit-all-paths:
      - /v2/api-docs
      - /v3/api-docs
      - /doc.html
    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
  # 本地联调默认用户上下文（与 init-v2.sql 测试数据 @org_id=1 @tenant_id=1001 一致）
  public-api:
    system-user-id: 1
    system-user-name: local-dev
    tenant-id: 1001
    org-id: 1