【发布时间】:2019-07-31 20:24:24
【问题描述】:
我在我的 pom.xml 中包含了执行器和 hal 浏览器依赖项,因为我已将配置 management.endpoints.web.exposure.include=* 放在 application.properties 中,但我在 /actautor 中没有找到 httptrace,请告诉我如果我遗漏了什么。
【问题讨论】:
-
我可以看到指标和其他选项。
我在我的 pom.xml 中包含了执行器和 hal 浏览器依赖项,因为我已将配置 management.endpoints.web.exposure.include=* 放在 application.properties 中,但我在 /actautor 中没有找到 httptrace,请告诉我如果我遗漏了什么。
【问题讨论】:
要使其工作,您应该添加 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 如果您不想暴露多余的端点。
【讨论】: