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

相关推荐
A ?Charis8 小时前
记录一下_treafik使用Gateway-APi使用的细节参数
gateway
运维开发王义杰3 天前
Kubernetes:EKS 中 Istio Ingress Gateway 负载均衡器配置及常见问题解析
kubernetes·gateway·istio
铭毅天下4 天前
极限网关 INFINI Gateway 从 0 到 1:简单易懂的入门教程
gateway
铭毅天下4 天前
极限网关核心架构解析:从 Nginx 到 INFINI Gateway 的演进
运维·nginx·架构·gateway
Xwzzz_5 天前
Spring Cloud Gateway中断言路由和过滤器的使用
java·spring cloud·gateway
zzyh1234565 天前
springcloudalibaba组件gateway
前端·javascript·gateway
@明明不知道5 天前
spring cloud 微服务部署(2025年)第一章:Nacos、LoadBalancer、GateWay、Ribbon集成之Nacos部署
spring cloud·微服务·nacos·gateway·loadbalancer
山海不说话6 天前
从零搭建微服务项目(第7章——微服务网关模块基础实现)
java·spring boot·spring·spring cloud·微服务·gateway
默辨6 天前
再谈SpringCloud Gateway源码
java·网关·spring cloud·gateway·reactor·webflux
飞火流星020276 天前
【动态路由】系统web url整合系列【springcloud-gateway实现】【不改hosts文件版】组件一:多个Eureka路由过滤器
gateway·gateway动态路由·gateway实现反向代理·系统url整合·eureka路由过滤器·gateway路由过滤器