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

相关推荐
PXM的算法星球4 天前
spring gateway配合nacos实现负载均衡
spring·gateway·负载均衡
1990_super4 天前
使用ceph-deploy安装和配置RADOS Gateway (RGW)并使用S3访问集群
ceph·gateway
北极糊的狐7 天前
接口返回504 Gateway Time-out 错误,这意味着请求在网关或代理服务器等待上游服务器响应时超时。以下是可能的原因和排查建议:
数据库·gateway
sg_knight8 天前
Spring Cloud Gateway全栈实践:动态路由能力与WebFlux深度整合
java·spring boot·网关·spring·spring cloud·微服务·gateway
放纵日放纵10 天前
微服务—Gateway
微服务·架构·gateway
你我约定有三11 天前
分布式微服务--GateWay(1)
java·开发语言·分布式·微服务·架构·gateway
William一直在路上14 天前
KONG API Gateway中的核心概念
网络·gateway·kong
Java牛马16 天前
SpringCloud之Gateway
网关·spring cloud·gateway·路由·过滤器·断言
yh云想17 天前
《微服务SpringCloud架构实践指南:从Nacos到Gateway的全面解析》
spring cloud·nacos·gateway·openfeign·filter