private static ConditionOutcome verifySelectedFeatureModules(final CasFeatureModule.FeatureCatalog[] features,
                                                                 final String module, final String selectedModules) {

        val selectedFeatures = List.of(selectedModules.split(","));
        var featureIsSelected = false;
        for (val feature : features) {
            val property = feature.toProperty(module);
            featureIsSelected = selectedFeatures.stream().anyMatch(feat -> feat.startsWith(property) && feat.endsWith(".enabled=true"));
            if (!featureIsSelected) {
                featureIsSelected = StringUtils.isBlank(module) && CasFeatureModule.baseline().contains(feature);
            }
            if (!featureIsSelected) {
                val message = "CAS feature " + property + " is not selected and will be enabled.";
                LOGGER.info(message);
                return ConditionOutcome.noMatch(message);
            }
            val message = "CAS feature " + property + " is selected and will be enabled.";
            LOGGER.info(message);
            feature.register(module);
        }
        return ConditionOutcome.match("Requested features " + Arrays.toString(features) + " are enabled");
    }
This is {@link CasFeatureEnabledCondition}.

@author Misagh Moayyed
@since 6.5.0
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/spring/boot/CasFeatureEnabledCondition.java