当前位置: 首页 > ops >正文

gateway 网关 路由新增 (已亲测)

问题:

   前端通过gateway调用后端接口,路由转发失败,提示404 not found

排查:

   使用 { "href":"/actuator/gateway/routes", "methods":[ "POST", "GET" ] } 命令查看路由列表,确实缺少路由信息

curl -v  http://127.0.0.1:9090/actuator/gateway/routes  >> 123.txt

输出到 123.txt 文件

处理方式:
   1、 手动刷新

      { "href":"/actuator/gateway/refresh", "methods":[ "POST" ] }

   2、 手动添加

      { "href":"/actuator/gateway/routes/route-id-1", "methods":[ "POST", "DELETE", "GET" ] }

官方说明:
 

To create a route definition, make a POST request to /gateway/routes/{id_route_to_create} with a JSON body that specifies the fields of the route (see Retrieving Information about a Particular Route).

To delete a route definition, make a DELETE request to /gateway/routes/{id_route_to_delete}.

官网地址:
Spring Cloud Gateway

操作截图:

http://www.xdnf.cn/news/11921.html

相关文章:

  • Python训练营打卡 Day44
  • linux shell脚本硬件定时检测通过邮箱警告管理人员
  • LLM之RAG实战(五十四)| 复杂文档处理RAG框架:Ragflow
  • 振动力学:弹性杆的纵向振动(固有振动和固有频率的概念)
  • [蓝桥杯]填字母游戏
  • 短视频矩阵系统源码新发布技术方案有那几种?
  • 2025.6.4总结
  • 霍夫曼编码详解
  • qiankun模式下 主应用严格模式,子应用el-popover 点击无效不显示
  • STM32L0看门狗设置LL库
  • ABP-Book Store Application中文讲解 - Part 9: Authors: User Interface
  • 代码随想录刷题day29
  • 【免费】酒店布草洗涤厂自动统计管理系统(1)——智能编程——仙盟创梦IDE
  • Redis中的过期策略与内存淘汰策略
  • 剩余类和完全剩余系
  • 【Linux】Linux程序地址基础
  • ‘utf-8‘ codec can‘t decode byte 0xc9 in position 18:
  • css-塞贝尔曲线
  • Ubuntu 25.10 将默认使用 sudo-rs
  • Python IP可达性检测脚本解析
  • Redis初入门
  • python爬虫:Newspaper3k 的详细使用(好用的新闻网站文章抓取和解析的Python库)
  • MySQL 8.0 窗口函数全面解析与实例
  • 力提示(force prompting)的新方法
  • leetcode1443. 收集树上所有苹果的最少时间-medium
  • Oracle数据库笔记
  • Windows下运行Redis并设置为开机自启的服务
  • @Prometheus动态配置管理-ConsulConfd
  • ArcGIS Pro 3.4 二次开发 - 地图探索
  • unix/linux,sudo,其基本概念、定义、性质、定理