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} 删除路由

相关推荐
云和数据.ChenGuang21 小时前
`neutron router-gateway-set` 操作失败的可能原因及解决方案
运维·gateway·运维技术总结·运维技术
要开心吖ZSH3 天前
【Spring Cloud Gateway 实战系列】终极篇:演进方向与未来架构
spring cloud·gateway
@小了白了兔3 天前
统一服务入口——Spring Cloud Gateway
java·spring cloud·gateway
要开心吖ZSH3 天前
【Spring Cloud Gateway 实战系列】进阶篇:过滤器高级用法、动态路由配置与性能优化
spring cloud·性能优化·gateway·负载均衡
亲爱的非洲野猪4 天前
Spring Cloud Gateway 电商系统实战指南:架构设计与深度优化
java·spring cloud·gateway
[听得时光枕水眠]4 天前
Gateway
java·开发语言·gateway
Java小白笔记6 天前
Nacos中feign.FeignException$BadGateway: [502 Bad Gateway]
微服务·gateway
勿芮介9 天前
【微服务】Ocelot微服务网关
微服务·c#·gateway
DexterLien11 天前
API Gateway HTTP API 控制客户端访问 IP 源
http·gateway·aws·lambda·authorizer
johnny23313 天前
ShenYu实战、问题记录
gateway