使用Spring Boot 2.2.0,“ httptrace”执行器端点不再存在。如何获得此功能?
默认情况下,该功能已在Spring Boot 2.2.0中删除,请参阅:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2.0-M3-Release-Notes#actuator-http-trace-and-auditing-are-disabled-by-default
将此配置添加到Spring环境中:management.trace.http.enabled: true
并提供像这样的HttpTraceRepository
bean:
@Configuration
@Profile("actuator-endpoints")
public class HttpTraceActuatorConfiguration {
@Bean
public HttpTraceRepository httpTraceRepository() {
return new InMemoryHttpTraceRepository();
}
}