private static boolean shouldRegisterLinksMapping(
        final WebEndpointProperties webEndpointProperties,
        final Environment environment,
        final String basePath) {
        return webEndpointProperties.getDiscovery().isEnabled()
            && (StringUtils.hasText(basePath)
            || ManagementPortType.get(environment) == ManagementPortType.DIFFERENT);
    }
This is {@link CasCoreActuatorsConfiguration}.
Beans in this class are conditionally imported
depending on whether management endpoints are to be deployed
in a separate management context. 
@author Misagh Moayyed
@see CasCoreWebManagementContextConfiguration
@since 7.2.0
core/cas-server-core-web/src/main/java/org/apereo/cas/config/CasCoreActuatorsConfiguration.java