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

相关推荐
骚戴21 小时前
架构设计之道:构建高可用的大语言模型(LLM) Enterprise GenAI Gateway
java·人工智能·架构·大模型·gateway·api
Maiko Star3 天前
Gateway网关拦截自定义header & 用户上下文打通实战
gateway·threadlocal
skywalk81636 天前
LLM API Gateway:使用Comate Spec Mode创建大模型调用中转服务器
服务器·人工智能·gateway·comate
我是小妖怪,潇洒又自在6 天前
springcloud alibaba(七)Gateway--服务网关
spring·spring cloud·gateway
boy快快长大9 天前
【Spring Cloud Alibaba】Gateway(一)
数据库·gateway
谷隐凡二10 天前
网关的核心概念及简单演进介绍
gateway
摇滚侠10 天前
2025最新 SpringCloud 教程,Gateway-过滤器-基本使用,笔记58
笔记·spring cloud·gateway
摇滚侠10 天前
2025最新 SpringCloud 教程,Gateway-过滤器-globalFilter,笔记60
笔记·spring cloud·gateway
摇滚侠10 天前
2025最新 SpringCloud 教程,Gateway-过滤器-默认过滤器,笔记59
笔记·spring cloud·gateway