@EndpointWebExtension。您可以执行以下 *** 作;
@Component@EndpointWebExtension(endpoint = HealthEndpoint.class)public class HealthEndpointWebExtension { private HealthEndpoint healthEndpoint; private HealthStatusHttpMapper statusHttpMapper; // Constructor @ReadOperation public WebEndpointResponse<Health> health() { Health health = this.healthEndpoint.health(); Integer status = this.statusHttpMapper.mapStatus(health.getStatus()); // log here depending on health status. return new WebEndpointResponse<>(health, status); }}
更多关于执行器终点延伸这里,在 4.8。
扩展现有端点
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)