server:
  port: 8085

spring:
  application:
    name: seer-gateway
  profiles:
    active: dev
  main:
    web-application-type: reactive
    allow-circular-references: true
  servlet:
    multipart:
      max-file-size: 200MB
      max-request-size: 200MB
  autoconfigure:
    exclude: org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration

  cloud:
    loadbalancer:
      health-check:
        interval: 30s     # 健康检查间隔（默认2秒）
      cache:
        enabled: true     # 是否启用缓存（默认true）
        ttl: 30s         # 缓存有效期（默认2秒）
    nacos:
      discovery:
        server-addr: 192.168.0.39:8848  # Nacos 服务地址
        group: DEFAULT_GROUP         # 分组（默认DEFAULT_GROUP）
        namespace: ${spring.profiles.active}
      config:
        server-addr: 192.168.0.39:8848  # 配置中心地址
        file-extension: yaml         # 配置文件后缀（yaml/properties）
        namespace: ${spring.profiles.active}
    gateway:
      discovery:
        locator:
          enabled: true # 开启通过服务发现创建路由
          lower-case-service-id: true # 服务名小写
      routes:
        - id: seer-admin # 路由的编号
          uri: lb://seer-admin
          predicates:
            - Path=/seer/admin/**
        - id: seer-teacher
          uri: lb://seer-teacher
          predicates:
            - Path=/seer/teacher/**
        - id: seer-iot
          uri: lb://seer-iot
          predicates:
            - Path=/seer/iot/**
        - id: seer-mall
          uri: lb://seer-mall
          predicates:
            - Path=/seer/mall/**
        - id: seer-pay
          uri: lb://seer-pay
          predicates:
            - Path=/seer/pay/**
        - id: seer-user
          uri: lb://seer-user
          predicates:
            - Path=/seer/user/**
        - id: seer-mp
          uri: lb://seer-mp
          predicates:
            - Path=/seer/mp/**
        - id: seer-open-api
          uri: lb://seer-open-api
          predicates:
            - Path=/seer/open/rest/**

  config:
    import:
      - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml
      - optional:nacos:shared-redis.yaml

logging:
  #config: classpath:logback-${spring.profiles.active}.xml
  level:
    org.springframework.cloud.gateway: DEBUG  # 查看 Gateway 过滤器链
    org.springframework.security: DEBUG      # 检查 Spring Security 拦截
    reactor.netty.http.client: DEBUG        # 查看网络层交互


zs:
  decryption:
    enabled: true
  encryption:
    enabled: true
  cors:
    origins:
      - http://localhost:*
      - http://192.168.*:*
      - http://10.10.*:*
      - http://10.10.4.143:8020
      - http://10.10.3.134:8020
      - https://admin-api.seerteach.net:*
      - http://admin-api.seerteach.net:*
      - https://admin.seerteach.net:*
      - https://admin.seerteach.net