Gateway路由

Route以微服务名-动态获取服务URI

痛点:路由url写死问题。

是什么

https://docs.spring.io/spring-cloud-gateway/reference/spring-cloud-gateway/global-filters.html#reactive-loadbalancer-client-filter

修改 9527 yml中的url

测试

如果将8001微服务ym1文件端口修改为8007,照样访问我实际启动的程序是main8001但是端口名改为8007。

http://localhost/orderGateway/get/1

http://localhost/orderGateway/info

成功访问。

相关推荐

  1. springcloud gateway动态

    2024-05-01 05:52:02       59 阅读
  2. springcloud gateway routes 规则

    2024-05-01 05:52:02       59 阅读
  3. SpringCloud GateWay实现限流

    2024-05-01 05:52:02       64 阅读
  4. Spring Cloud Gateway 配置策略

    2024-05-01 05:52:02       55 阅读
  5. Gateway谓词(断言)功能

    2024-05-01 05:52:02       42 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-01 05:52:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-01 05:52:02       101 阅读
  3. 在Django里面运行非项目文件

    2024-05-01 05:52:02       82 阅读
  4. Python语言-面向对象

    2024-05-01 05:52:02       91 阅读

热门阅读

  1. C++11 设计模式7 策略模式 ,Strategy

    2024-05-01 05:52:02       27 阅读
  2. 真渗透小结

    2024-05-01 05:52:02       29 阅读
  3. vscode相关插件使用----持续更新中

    2024-05-01 05:52:02       28 阅读
  4. cartographer问题处理

    2024-05-01 05:52:02       36 阅读
  5. Go语言结构体

    2024-05-01 05:52:02       34 阅读
  6. Unity中WWWForm与 JsonUtility.ToJson区别

    2024-05-01 05:52:02       28 阅读
  7. 【PyTorch与深度学习】1、PyTorch介绍与张量的创建

    2024-05-01 05:52:02       23 阅读
  8. 安信天行-渗透测试实习生

    2024-05-01 05:52:02       30 阅读
  9. make构建自动化工具介绍

    2024-05-01 05:52:02       23 阅读
  10. redis工具类

    2024-05-01 05:52:02       22 阅读
  11. python-基础(7)-判断结构

    2024-05-01 05:52:02       33 阅读