private static void configureExposableWebEndpoint(ServerBuilder sb, @Nullable Integer targetPort,
                                                      Collection<ExposableWebEndpoint> endpoints,
                                                      HttpCodeStatusMapper statusMapper,
                                                      EndpointMediaTypes mediaTypes,
                                                      EndpointMapping endpointMapping,
                                                      @Nullable CorsServiceBuilder cors,
                                                      WebEndpointProperties properties) {
        final List<Integer> ports = targetPort == null ? ImmutableList.of() : ImmutableList.of(targetPort);
        endpoints.stream()
                 .flatMap(endpoint -> endpoint.getOperations().stream())
                 .forEach(operation -> {
                     final WebOperationRequestPredicate predicate = operation.getRequestPredicate();
                     final String path = endpointMapping.createSubPath(predicate.getPath());
                     addOperationService(sb, ports, operation, statusMapper,
                                         predicate, path, ImmutableMap.of(), cors);
                 });

        if (StringUtils.hasText(endpointMapping.getPath()) && properties.getDiscovery().isEnabled()) {
            final Route route = route(
                    HttpMethod.GET.name(),
                    endpointMapping.getPath(),
                    ImmutableList.of(),
                    mediaTypes.getProduced()
            );
            final HttpService linksService = (ctx, req) -> {
                final Map<String, Link> links =
                        new EndpointLinksResolver(endpoints).resolveLinks(req.path());
                final MediaType contentType = firstNonNull(ctx.negotiatedResponseMediaType(), MediaType.JSON);
                return HttpResponse.ofJson(contentType, ImmutableMap.of("_links", links));
            };
            if (targetPort == null) {
                sb.route().addRoute(route).defaultServiceName("LinksService").build(linksService);
            } else {
                sb.virtualHost(targetPort).route().addRoute(route)
                  .defaultServiceName("LinksService")
                  .build(linksService);
            }
            if (cors != null) {
                cors.route(endpointMapping.getPath());
            }
        }
    }
Returns a {@link HttpCodeStatusMapper}.
See <a href="https://github.com/spring-projects/spring-boot/blob/9643dbeed26268f37d37c22385704de8911b8f21/spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/endpoints.adoc#writing-custom-healthindicators">writing-custom-healthindicators</a>.
spring/boot3-actuator-autoconfigure/src/main/java/com/linecorp/armeria/spring/actuate/ArmeriaSpringActuatorAutoConfiguration.java