# gateway-nanruan **Repository Path**: yuanzheng2018/gateway-nanruan ## Basic Information - **Project Name**: gateway-nanruan - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-15 - **Last Updated**: 2024-05-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 网关服务 ### 域名配置 - 开发环境 ``` devgw.wlyuan.com.cn ``` - 测试环境 ``` testgw.wlyuan.com.cn ``` - 预发布环境 ``` pregw.wlyuan.com.cn ``` - 生产环境 ``` gw.wlyuan.com.cn ``` - 开放平台 ``` open.wlyuan.com.cn ``` ### 配置说明 #### 路由配置 ``` spring: mvc: throw-exception-if-no-handler-found: true resources: add-mappings: true cloud: gateway: routes: - id: user-service uri: lb://user-service predicates: - Path=/user/** # 不要带-service这一段,保持统一规则有利于统一处理 filters: - StripPrefix=1 - name: RequestRateLimiter # 限流配置 args: key-resolver: '#{@ipKeyResolver}' # 对ip进行限流 redis-rate-limiter.replenishRate: 1 # 1秒内 redis-rate-limiter.burstCapacity: 3 # 3次 ```