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

相关推荐
摘星编程3 天前
Nginx 502 Bad Gateway:从 upstream 日志到 FastCGI 超时复盘
网络·nginx·gateway·php-fpm·fastcgi
网硕互联的小客服3 天前
504 Gateway Timeout:服务器作为网关或代理时未能及时获得响应如何处理?
运维·服务器·gateway
Pierre_4 天前
通过SpringCloud Gateway实现API接口镜像请求(陪跑)网关功能
spring·spring cloud·gateway
kk在加油5 天前
智能门卫:Gateway
gateway
小安同学iter6 天前
Spring Cloud Gateway 网关(五)
java·开发语言·spring cloud·微服务·gateway
JAVA学习通6 天前
Spring Cloud ------ Gateway
java·spring cloud·gateway
weixin_449568708 天前
访问Nginx 前端页面,接口报502 Bad Gateway
前端·nginx·gateway
yangmf204011 天前
LDAP 认证系列(四):Gateway LDAP 认证
大数据·elasticsearch·搜索引擎·gateway·ldap
银迢迢13 天前
SpringCloud微服务技术自用笔记
java·spring cloud·微服务·gateway·sentinel
孤狼程序员17 天前
【Spring Cloud 微服务】2.守护神网关Gateway
spring cloud·微服务·gateway