@Bean
        @ConditionalOnMissingBean(name = "casTicketRegistryZooKeeperLockRepository")
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public LockRegistry casTicketRegistryZooKeeperLockRepository(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(LockRegistry.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val zk = casProperties.getTicket().getRegistry().getHazelcast().getCluster().getDiscovery().getZookeeper();
                    val curatorClient = CuratorFrameworkFactory.newClient(zk.getUrl(),
                        CONNECTION_TIMEOUT_MILLIS, CONNECTION_TIMEOUT_MILLIS,
                        new RetryNTimes(2, 100));
                    curatorClient.start();
                    return new ZookeeperLockRegistry(curatorClient);
                })
                .otherwiseProxy()
                .get();
        }
This is {@link CasHazelcastZooKeeperAutoConfiguration}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-hazelcast-discovery-zookeeper/src/main/java/org/apereo/cas/config/CasHazelcastZooKeeperAutoConfiguration.java