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

相关推荐
pengzhuofan8 小时前
Gateway微服务网关
微服务·架构·gateway
g***866913 小时前
springcloud-eureka与gateway简易搭建
spring cloud·eureka·gateway
q***656913 小时前
Nginx反向代理出现502 Bad Gateway问题的解决方案
运维·nginx·gateway
NGINX开源社区16 小时前
将部署从 NGINX Ingress Controller 迁移至 NGINX Gateway Fabric
nginx·gateway·fabric
h***066517 小时前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
b***66612 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
z***43842 天前
当遇到 502 错误(Bad Gateway)怎么办
gateway
q***58193 天前
springcloud-eureka与gateway简易搭建
spring cloud·eureka·gateway
斯普信专业组3 天前
深入理解 Gateway API:设计原则、核心资源与数据流
运维·网关·gateway
百***68823 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel