莫大人

1.3.9、通过权重 Weight匹配

server:
  port: 8080

spring: 
  application:
    name: gateway
  cloud:
    gateway:
      routes:
        - id: guo-system1
          uri: https://www.baidu.com
          predicates:
            - Weight=group1, 8 #路由权重比,80%
          filters:
            - StripPrefix=1
        - id: guo-system2
          uri: https://www.json.cn
          predicates:
            - Weight=group1, 2 #路由权重比,20%
          filters:
            - StripPrefix=1

 

posted on 2021-06-21 11:47  莫大人  阅读(61)  评论(0编辑  收藏  举报

导航