Spring Boot Actuator的Spring Boot 2.2.0端点不再存在

问题描述 投票:0回答:1

使用Spring Boot 2.2.0,“ httptrace”执行器端点不再存在。如何获得此功能?

spring-boot spring-boot-actuator
1个回答
0
投票

默认情况下,该功能已在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();
    }

}

http://localhost:8080/actuator/httptrace再次起作用。

© www.soinside.com 2019 - 2024. All rights reserved.