You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

配置Resilience4j后Circuitbreakerevents管理端点访问404问题

解决Resilience4j CircuitBreakerEvents端点404问题

常见原因及修复方案

1. 未显式暴露circuitbreakerevents端点

Spring Boot Actuator默认仅对外暴露health和info端点,需主动配置暴露circuitbreakerevents:
在application.yml中添加:

management:
  endpoints:
    web:
      exposure:
        include: health, circuitbreakerevents

或application.properties:

management.endpoints.web.exposure.include=health,circuitbreakerevents

2. 使用了Actuator默认路径前缀

默认情况下,Actuator端点的基础路径是/actuator,正确访问路径应为:
http://localhost:8080/actuator/circuitbreakerevents
而非直接访问根路径下的/circuitbreakerevents。

若想修改基础路径为根路径,可配置:

management:
  endpoints:
    web:
      base-path: /

3. 版本兼容问题

确保Resilience4j Starter与Spring Boot版本匹配:

  • Spring Boot 2.x对应Resilience4j 1.x版本
  • Spring Boot 3.x对应Resilience4j 2.x版本
    版本不匹配会导致端点无法正常注册。

4. 自定义管理服务器上下文路径

若配置了management.server.servlet.context-path,需将其加入访问路径。例如:

management:
  server:
    servlet:
      context-path: /manage

此时访问路径应为:http://localhost:8080/manage/actuator/circuitbreakerevents

验证步骤

  1. 重启应用后,访问http://localhost:8080/actuator(若修改基础路径则对应调整),查看返回的端点列表是否包含circuitbreakerevents
  2. 确认列表存在后,再访问对应的完整路径

内容的提问来源于stack exchange,提问作者deikyb

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 01:50:24