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

相关推荐
yuluo_YX13 天前
AI Gateway 介绍
人工智能·gateway
网硕互联的小客服16 天前
502 Bad Gateway:服务器作为网关或代理时收到无效响应处理方式
运维·服务器·gateway
sevevty-seven16 天前
什么是Gateway
gateway
秋の花16 天前
【GateWay】和权限验证
java·gateway
欧先生^_^18 天前
org.springframework.cloud.gateway 组件解释
gateway
jarenyVO19 天前
Spring Cloud Gateway 全面学习指南
java·gateway
保持学习ing21 天前
微服务--Gateway网关
java·网关·微服务·gateway
SZ17011023122 天前
IGP(Interior Gateway Protocol,内部网关协议)
运维·服务器·gateway
肥仔哥哥193022 天前
SpringCloud2025+SpringBoot3.5.0+gateway+webflux子服务路由报503
微服务·gateway·最新微服务
亚林瓜子1 个月前
AWS API Gateway配置日志
云计算·gateway·aws·log·cloudwatch