@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "redisServiceRegistry")
    public ServiceRegistry redisServiceRegistry(
        final ObjectProvider<List<ServiceRegistryListener>> serviceRegistryListeners,
        @Qualifier("registeredServiceRedisTemplate")
        final CasRedisTemplate<String, RegisteredService> registeredServiceRedisTemplate,
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(ServiceRegistry.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> new RedisServiceRegistry(applicationContext, registeredServiceRedisTemplate,
                Optional.ofNullable(serviceRegistryListeners.getIfAvailable()).orElseGet(ArrayList::new)))
            .otherwiseProxy()
            .get();

    }
This is {@link CasRedisServiceRegistryAutoConfiguration}.

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