@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @Bean
    @ConditionalOnMissingBean(name = "restfulServiceRegistryExecutionPlanConfigurer")
    public ServiceRegistryExecutionPlanConfigurer restfulServiceRegistryExecutionPlanConfigurer(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("restfulServiceRegistry")
        final ServiceRegistry restfulServiceRegistry) {
        return BeanSupplier.of(ServiceRegistryExecutionPlanConfigurer.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> plan -> {
                val registry = casProperties.getServiceRegistry().getRest();
                if (StringUtils.isNotBlank(registry.getUrl())) {
                    plan.registerServiceRegistry(restfulServiceRegistry);
                }
            })
            .otherwiseProxy()
            .get();
    }
This is {@link CasRestServiceRegistryAutoConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-rest-service-registry/src/main/java/org/apereo/cas/config/CasRestServiceRegistryAutoConfiguration.java