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

相关推荐
mashirro4 小时前
gateway服启动输出台显示
gateway
豆瓣鸡1 天前
网关、服务 userId 透传
java·微服务·gateway
Sean‘8 天前
GitLab 升级后 502:Puma 反复重启问题处理记录
docker·gateway·gitlab
Hadoop_Liang1 个月前
使用Kubernetes Gateway API实现域名访问应用
容器·kubernetes·gateway
worilb1 个月前
Spring Cloud 学习与实践(9):Gateway + JWT 统一鉴权
学习·spring cloud·gateway
Dontla1 个月前
Kong Gateway(OSS)(Open Source Software)与 Kong Gateway(Enterprise)区别
gateway·kong
心之伊始1 个月前
Spring Boot Actuator + Micrometer 实战:自定义业务指标并接入 Prometheus 观测接口耗时
java·spring boot·prometheus·actuator·micrometer
yxl874646461 个月前
磐创PCTG-9013 Modbus转ProfibusDP工业协议转换器
网络·科技·物联网·gateway·信息与通信
__log1 个月前
401鉴权问题完全指南:从“门卫拦人“到“畅通无阻“
gateway
暗夜猎手-大魔王1 个月前
hermes源码学习8--Gateway 内部机制
人工智能·gateway