@UnstableApi
    public static InternalServices of(
            ArmeriaSettings settings,
            MeterRegistry meterRegistry,
            List<HealthChecker> healthCheckers,
            List<HealthCheckServiceConfigurator> healthCheckServiceConfigurators,
            List<DocServiceConfigurator> docServiceConfigurators,
            @Nullable Integer managementServerPort,
            @Nullable InetAddress managementServerAddress,
            boolean enableManagementServerSsl) {

        DocService docService = null;
        if (!Strings.isNullOrEmpty(settings.getDocsPath())) {
            final DocServiceBuilder docServiceBuilder = DocService.builder();
            docServiceConfigurators.forEach(configurator -> configurator.configure(docServiceBuilder));
            docService = docServiceBuilder.build();
        }

        HealthCheckService healthCheckService = null;
        if (!Strings.isNullOrEmpty(settings.getHealthCheckPath())) {
            final HealthCheckServiceBuilder builder = HealthCheckService.builder().checkers(healthCheckers);
            healthCheckServiceConfigurators.forEach(configurator -> configurator.configure(builder));
            healthCheckService = builder.build();
        } else if (!healthCheckServiceConfigurators.isEmpty()) {
            logger.warn("{}s exist but they are disabled by the empty 'health-check-path' property." +
                        " configurators: {}",
                        HealthCheckServiceConfigurator.class.getSimpleName(),
                        healthCheckServiceConfigurators);
        }

        HttpService expositionService = null;
        if (settings.isEnableMetrics() && !Strings.isNullOrEmpty(settings.getMetricsPath())) {
            final String prometheusMeterRegistryClassName =
                    "io.micrometer.prometheusmetrics.PrometheusMeterRegistry";
            final boolean hasPrometheus = hasAllClasses(
                    prometheusMeterRegistryClassName,
                    "io.prometheus.metrics.model.registry.PrometheusRegistry",
                    "com.linecorp.armeria.server.prometheus.PrometheusExpositionService");

            if (hasPrometheus) {
                expositionService = PrometheusSupport.newExpositionService(meterRegistry);
            }

            final String legacyPrometheusMeterRegistryClassName =
                    "io.micrometer.prometheus.PrometheusMeterRegistry";
            final boolean hasLegacyPrometheus = hasAllClasses(
                    legacyPrometheusMeterRegistryClassName,
                    "io.prometheus.client.CollectorRegistry");

            if (hasLegacyPrometheus) {
                expositionService = PrometheusLegacySupport.newExpositionService(meterRegistry);
            }

            final String dropwizardMeterRegistryClassName =
                    "io.micrometer.core.instrument.dropwizard.DropwizardMeterRegistry";
            if (expositionService == null) {
                final boolean hasDropwizard = hasAllClasses(
                        dropwizardMeterRegistryClassName,
                        "com.codahale.metrics.MetricRegistry",
                        "com.codahale.metrics.json.MetricsModule");
                if (hasDropwizard) {
                    expositionService = DropwizardSupport.newExpositionService(meterRegistry);
                }
            }
            if (expositionService == null) {
                logger.debug("Failed to expose metrics to '{}' with {} (expected: either {} or {})",
                             settings.getMetricsPath(), meterRegistry, legacyPrometheusMeterRegistryClassName,
                             dropwizardMeterRegistryClassName);
            }
        }

        final Port internalPort = settings.getInternalServices();
        if (internalPort != null && internalPort.getPort() == 0) {
            internalPort.setPort(PortUtil.unusedTcpPort());
        }
        return new InternalServices(docService, expositionService,
                                    healthCheckService, internalPort,
                                    maybeNewPort(managementServerPort,
                                                 managementServerAddress,
                                                 enableManagementServerSsl));
    }
Returns a newly created {@link InternalServices} from the specified properties.
spring/boot3-autoconfigure/src/main/java/com/linecorp/armeria/spring/InternalServices.java