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

相关推荐
angushine10 天前
Gateway获取下游最终响应码
java·开发语言·gateway
鬼布11 天前
post请求在gateway打印日志内存遗漏
java·gateway
TE-茶叶蛋11 天前
2025-Gateway架构
架构·gateway
小样vvv11 天前
【微服务管理】深入理解 Gateway 网关:原理与实现
微服务·gateway
sky.fly12 天前
在思科模拟器show IP route 发现Gateway of last resort is not set没有设置最后的通道
网络协议·tcp/ip·gateway
angushine13 天前
Gateway统一修改响应内容
gateway
曾经的三心草13 天前
Gateway-网关-分布式服务部署
gateway·分布式服务部署
云攀登者-望正茂15 天前
通过AWS WAF Rate limit rule来保护API Gateway
网络·gateway·aws
小怪瘦7917 天前
IDEA :物联网ThingsBoard-gateway配置,运行Python版本,连接thingsboard,接入 MQTT 设备
python·物联网·gateway·idea
字节源流19 天前
【Spring Cloud Netflix】GateWay服务网关
java·运维·gateway