server: port: 8080 spring: application: name: fund-gateway # Redis配置(用于限流) data: redis: host: localhost port: 6379 password: zjf@123456 database: 1 cloud: compatibility-verifier: enabled: false gateway: # 默认限流配置 default-filters: - name: RequestRateLimiter args: redis-rate-limiter.replenishRate: 100 # 每秒补充令牌数 redis-rate-limiter.burstCapacity: 200 # 令牌桶最大容量 key-resolver: "#{@ipKeyResolver}" routes: # 系统管理服务 - id: fund-sys uri: http://localhost:8100 predicates: - Path=/sys/** filters: - StripPrefix=1 # 客户管理服务 - id: fund-cust uri: http://localhost:8110 predicates: - Path=/cust/** filters: - StripPrefix=1 # 项目管理服务 - id: fund-proj uri: http://localhost:8120 predicates: - Path=/proj/** filters: - StripPrefix=1 # 用款申请服务 - id: fund-req uri: http://localhost:8130 predicates: - Path=/req/** filters: - StripPrefix=1 # 支出管理服务 - id: fund-exp uri: http://localhost:8140 predicates: - Path=/exp/** filters: - StripPrefix=1 # 收款管理服务 - id: fund-receipt uri: http://localhost:8150 predicates: - Path=/receipt/** filters: - StripPrefix=1 # 报表服务 - id: fund-report uri: http://localhost:8160 predicates: - Path=/report/** filters: - StripPrefix=1 # 文件服务 - id: fund-file uri: http://localhost:8170 predicates: - Path=/file/** filters: - StripPrefix=1 logging: level: org.springframework.cloud.gateway: DEBUG