use of org.apereo.cas.services.ServiceRegistryInitializer in project cas by apereo.
the class CasServiceRegistryInitializationConfiguration method serviceRegistryInitializer.
@RefreshScope
@Bean
public ServiceRegistryInitializer serviceRegistryInitializer() {
final ServiceRegistryProperties props = casProperties.getServiceRegistry();
final ServiceRegistry serviceRegistryInstance = serviceRegistry.getIfAvailable();
final ServiceRegistryInitializer initializer = new ServiceRegistryInitializer(embeddedJsonServiceRegistry(), serviceRegistryInstance, servicesManager.getIfAvailable(), props.isInitFromJson());
if (props.isInitFromJson()) {
LOGGER.info("Attempting to initialize the service registry [{}] from service definition resources found at [{}]", serviceRegistryInstance.getName(), getServiceRegistryInitializerServicesDirectoryResource());
}
initializer.initServiceRegistryIfNecessary();
return initializer;
}
Aggregations