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

        return BeanSupplier.of(ServiceRegistry.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val properties = casProperties.getServiceRegistry().getGit();
                val locators = new ArrayList<GitRepositoryRegisteredServiceLocator>();
                if (properties.isGroupByType()) {
                    locators.add(new TypeAwareGitRepositoryRegisteredServiceLocator(resourceNamingStrategy,
                        gitServiceRegistryRepositoryInstance.getRepositoryDirectory(), properties));
                }
                locators.add(new DefaultGitRepositoryRegisteredServiceLocator(resourceNamingStrategy,
                    gitServiceRegistryRepositoryInstance.getRepositoryDirectory(), properties));
                return new GitServiceRegistry(applicationContext, gitServiceRegistryRepositoryInstance,
                    CollectionUtils.wrapList(new RegisteredServiceJsonSerializer(applicationContext),
                        new RegisteredServiceYamlSerializer(applicationContext)),
                    properties.isPushChanges(), properties.getRootDirectory(),
                    Optional.ofNullable(serviceRegistryListeners.getIfAvailable()).orElseGet(ArrayList::new), locators);
            })
            .otherwiseProxy()
            .get();
    }
This is {@link CasGitServiceRegistryAutoConfiguration}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-git-service-registry/src/main/java/org/apereo/cas/config/CasGitServiceRegistryAutoConfiguration.java