SpringCloud Gateway非负载均衡配置

SpringCloud Gateway非负载均衡配置

    gateway:
      discovery:
        locator:
          enabled: false #可以从nacos进行服务的发现
      routes: #配置网关路由规则
        - id: common-service #路由的id,唯一就可以
          uri: http://localhost:8020 #网关转发的url
          predicates: #断言,匹配请求规则的
            - Path=/common-api/minio/** #此时请求的路径就是
          filters: #网关过滤器
            - StripPrefix=1 #转发之前去掉path中第一层路径

猜你喜欢

转载自blog.csdn.net/weixin_41957626/article/details/132446298