@ConditionalOnMissingBean(name = RegisteredServicesTemplatesManager.BEAN_NAME)
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public RegisteredServicesTemplatesManager registeredServicesTemplatesManager(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(RegisteredServicesTemplatesManager.class)
                .when(BeanCondition.on("cas.service-registry.templates.directory.location").exists().given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val registeredServiceSerializer = new RegisteredServiceJsonSerializer(applicationContext);
                    return new DefaultRegisteredServicesTemplatesManager(casProperties.getServiceRegistry(), registeredServiceSerializer);
                })
                .otherwise(RegisteredServicesTemplatesManager::noOp)
                .get();
            
        }
This is {@link CasCoreServicesConfiguration}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-services/src/main/java/org/apereo/cas/config/CasCoreServicesConfiguration.java