@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public LockRepository casTicketRegistryLockRepository(
            final ConfigurableApplicationContext applicationContext,
            @Qualifier("casTicketRegistryZooKeeperLockRepository")
            final LockRegistry casTicketRegistryZooKeeperLockRepository) {
            return BeanSupplier.of(LockRepository.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> new DefaultLockRepository(casTicketRegistryZooKeeperLockRepository))
                .otherwise(LockRepository::noOp)
                .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