|
1 | 1 | /* |
2 | | - * Copyright 2012-2024 the original author or authors. |
| 2 | + * Copyright 2012-2025 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
16 | 16 |
|
17 | 17 | package org.springframework.boot.actuate.autoconfigure.health; |
18 | 18 |
|
19 | | -import java.util.Collection; |
20 | | - |
21 | 19 | import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnAvailableEndpoint; |
22 | 20 | import org.springframework.boot.actuate.autoconfigure.endpoint.expose.EndpointExposure; |
23 | | -import org.springframework.boot.actuate.endpoint.web.EndpointMapping; |
24 | | -import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint; |
25 | | -import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier; |
26 | | -import org.springframework.boot.actuate.endpoint.web.WebServerNamespace; |
27 | | -import org.springframework.boot.actuate.endpoint.web.reactive.AdditionalHealthEndpointPathsWebFluxHandlerMapping; |
28 | 21 | import org.springframework.boot.actuate.health.HealthEndpoint; |
29 | 22 | import org.springframework.boot.actuate.health.HealthEndpointGroups; |
30 | 23 | import org.springframework.boot.actuate.health.ReactiveHealthContributorRegistry; |
@@ -58,21 +51,4 @@ ReactiveHealthEndpointWebExtension reactiveHealthEndpointWebExtension( |
58 | 51 | properties.getLogging().getSlowIndicatorThreshold()); |
59 | 52 | } |
60 | 53 |
|
61 | | - @Configuration(proxyBeanMethods = false) |
62 | | - static class WebFluxAdditionalHealthEndpointPathsConfiguration { |
63 | | - |
64 | | - @Bean |
65 | | - AdditionalHealthEndpointPathsWebFluxHandlerMapping healthEndpointWebFluxHandlerMapping( |
66 | | - WebEndpointsSupplier webEndpointsSupplier, HealthEndpointGroups groups) { |
67 | | - Collection<ExposableWebEndpoint> webEndpoints = webEndpointsSupplier.getEndpoints(); |
68 | | - ExposableWebEndpoint health = webEndpoints.stream() |
69 | | - .filter((endpoint) -> endpoint.getEndpointId().equals(HealthEndpoint.ID)) |
70 | | - .findFirst() |
71 | | - .orElse(null); |
72 | | - return new AdditionalHealthEndpointPathsWebFluxHandlerMapping(new EndpointMapping(""), health, |
73 | | - groups.getAllWithAdditionalPath(WebServerNamespace.SERVER)); |
74 | | - } |
75 | | - |
76 | | - } |
77 | | - |
78 | 54 | } |
0 commit comments