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

相关推荐
Volunteer Technology21 小时前
SpringCloud Gateway知识点整理和全局过滤器实现
spring·spring cloud·gateway
matrixlzp1 天前
K8S Gateway AB测试、蓝绿发布、金丝雀(灰度)发布
kubernetes·gateway·ab测试
泽济天下3 天前
【工作记录】Kong Gateway 入门篇之部署及简单测试
gateway·kong
JAVA坚守者3 天前
API 网关核心功能解析:负载均衡、容灾、削峰降级原理与实战摘要
gateway·负载均衡·微服务架构·容灾备份·api 网关·削峰降级·云原生技术
SuperherRo4 天前
Web开发-JavaEE应用&SpringBoot栈&Actuator&Swagger&HeapDump&提取自动化
spring boot·java-ee·actuator
大G哥5 天前
实战演练:用 AWS Lambda 和 API Gateway 构建你的第一个 Serverless API
云原生·serverless·云计算·gateway·aws
说淑人5 天前
Spring Cloud & 以Gateway实现限流(自定义返回内容)
java·spring cloud·gateway·限流
zhojiew6 天前
istio in action之Gateway流量入口与安全
安全·gateway·istio
Absinthe_苦艾酒7 天前
SpringCloud之Gateway基础认识-服务网关
spring cloud·微服务·gateway
金斗潼关8 天前
SpringCloud GateWay网关
java·spring cloud·gateway