public static <T> ConfigurationPropertiesBindingContext<T> bindFrom(final Map<String, Object> payload, final Class<T> clazz) {
        val bindingResult = new LinkedHashMap<String, ConfigurationPropertyBindingResult>();
        if (!payload.isEmpty()) {
            val annotation = Objects.requireNonNull(clazz.getAnnotation(ConfigurationProperties.class));
            val name = StringUtils.defaultIfBlank(annotation.prefix(), annotation.value());
            val binder = new Binder(ConfigurationPropertySources.from(new MapPropertySource(clazz.getSimpleName(), payload)));
            val bound = binder.bind(name, Bindable.of(clazz), new ConfigurationPropertyBindHandler(bindingResult));
            if (bound.isBound()) {
                return new ConfigurationPropertiesBindingContext<>(bound.get(), bindingResult);
            }
        }
        return new ConfigurationPropertiesBindingContext(null, Map.of());
    }
Bind from map.

@param <T>     the type parameter
@param payload the payload
@param clazz   the clazz
@return the optional
api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/CasConfigurationProperties.java