@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @ConditionalOnMissingBean(name = "yamlServiceRegistry")
        public ServiceRegistry yamlServiceRegistry(
            @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 yaml = new YamlServiceRegistry(registry.getYaml().getLocation(),
                WatcherService.noOp(), applicationContext, registeredServiceReplicationStrategy,
                resourceNamingStrategy,
                Optional.ofNullable(serviceRegistryListeners.getIfAvailable()).orElseGet(ArrayList::new));
            if (registry.getYaml().isWatcherEnabled()) {
                yaml.enableDefaultWatcherService();
            }
            return yaml;
        }
This is {@link CasYamlServiceRegistryAutoConfiguration}.

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