@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "jsonServiceRegistry")
    public ServiceRegistry jsonServiceRegistry(
        @Qualifier(RegisteredServiceResourceNamingStrategy.BEAN_NAME)
        final RegisteredServiceResourceNamingStrategy resourceNamingStrategy,
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        @Qualifier("registeredServiceReplicationStrategy")
        final RegisteredServiceReplicationStrategy registeredServiceReplicationStrategy,
        final ObjectProvider<List<ServiceRegistryListener>> serviceRegistryListeners) throws Exception {

        val registry = casProperties.getServiceRegistry();
        val json = new JsonServiceRegistry(registry.getJson().getLocation(),
            WatcherService.noOp(),
            applicationContext,
            registeredServiceReplicationStrategy,
            resourceNamingStrategy,
            Optional.ofNullable(serviceRegistryListeners.getIfAvailable()).orElseGet(ArrayList::new));
        if (registry.getJson().isWatcherEnabled()) {
            json.enableDefaultWatcherService();
        }
        return json;
    }
This is {@link CasJsonServiceRegistryAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-json-service-registry/src/main/java/org/apereo/cas/config/CasJsonServiceRegistryAutoConfiguration.java