【问题标题】:Spring-boot - not finding httptrace at /actuator on HAL browserSpring-boot - 在 HAL 浏览器的 /actuator 上找不到 httptrace
【发布时间】:2019-07-31 20:24:24
【问题描述】:

我在我的 pom.xml 中包含了执行器和 hal 浏览器依赖项,因为我已将配置 management.endpoints.web.exposure.include=* 放在 application.properties 中,但我在 /actautor 中没有找到 httptrace,请告诉我如果我遗漏了什么。

【问题讨论】:

  • 我可以看到指标和其他选项。

标签: spring-boot-actuator


【解决方案1】:

要使其工作,您应该添加 HttpTraceRepository bean。简单的方法 - 在任何 @Configuration 类中编写:

 @Bean
    public HttpTraceRepository httpTrace() {
        return new InMemoryHttpTraceRepository();
    } 

当然 aplication.config 应该有 management.endpoints.web.exposure.include=* 或 management.endpoints.web.exposure.include=info,health,httptrace 如果您不想暴露多余的端点。

【讨论】:

    猜你喜欢
    • 2020-03-25
    • 2019-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-16
    • 2016-02-14
    • 1970-01-01
    相关资源
    最近更新 更多