springcloudgateway Actuator API

官方文档:11. Actuator API

开启actuator

加依赖

复制代码
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

加配置

复制代码
management:
  endpoints:
    web:
      exposure:
        # '*'表示所有,gateway表示只开启gateway
        include: "gateway"
  endpoint:
    gateway:
      #默认就是true,可以不写这个配置
      enabled: true

验证是否actuator是否正常访问

复制代码
http://www.example.com/actuator/gateway/routes

注意:不要用下面的url去验证,下面的url始终是404,不要进行无用的排查。

复制代码
http://www.example.com/actuator/gateway

常用端点如下

/actuator/gateway/globalfilters 全局过滤器

/actuator/gateway/routefilters 路由过滤器

/actuator/gateway/refresh 刷新路由缓存

/actuator/gateway/routes 路由列表

/actuator/gateway/routes/{id} 单个路由详情

POST /gateway/routes/{id_route_to_create} 创建路由

DELETE /gateway/routes/{id_route_to_delete} 删除路由

相关推荐
Dontla11 小时前
Kubernetes流量管理双雄:Ingress与Gateway API解析(Nginx与Ingress与Gateway API的关系)
nginx·kubernetes·gateway
JavaLearnerZGQ13 小时前
Gateway网关将登录用户信息传递给下游微服务(完整实现方案)
微服务·架构·gateway
Ares-Wang1 天前
网络》》BGP Border Gateway Protocol,边界网关协议
网络·gateway
一方_self2 天前
cloudflare AI gateway实战代理任意第三方大模型服务提供商
人工智能·gateway
雨中飘荡的记忆4 天前
Spring AI Gateway:从入门到实战,打造智能AI服务网关
人工智能·spring·gateway
没有bug.的程序员6 天前
Spring Cloud Gateway:API网关限流与熔断实战
java·开发语言·数据库·spring boot·gateway·api·springcloud
鸽鸽程序猿7 天前
【JavaEE】【SpringCloud】网关_GateWay
spring cloud·java-ee·gateway
短剑重铸之日7 天前
《SpringCloud实用版》 Gateway 4.3.x 保姆级实战:路由 + 限流 + 鉴权 + 日志全覆盖
java·后端·spring cloud·架构·gateway
一条咸鱼_SaltyFish11 天前
WebFlux vs MVC:Gateway集成若依框架的技术选型之争
java·开发语言·微服务·gateway·mvc·开源软件·webflux
亚林瓜子13 天前
AWS API Gateway添加OAuth2请求头传递app id信息
云计算·gateway·aws·oauth2·请求头·principalid