@Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @ConditionalOnMissingBean(name = ServicesManagerConfigurationContext.BEAN_NAME)
        public ServicesManagerConfigurationContext servicesManagerConfigurationContext(
            @Qualifier(TenantExtractor.BEAN_NAME)
            final TenantExtractor tenantExtractor,
            final CasConfigurationProperties casProperties,
            @Qualifier(RegisteredServicesTemplatesManager.BEAN_NAME)
            final RegisteredServicesTemplatesManager registeredServicesTemplatesManager,
            @Qualifier(ServiceRegistry.BEAN_NAME)
            final ChainingServiceRegistry serviceRegistry,
            @Qualifier(RegisteredServiceIndexService.BEAN_NAME)
            final RegisteredServiceIndexService registeredServiceIndexService,
            @Qualifier(WebApplicationService.BEAN_NAME_FACTORY)
            final ServiceFactory serviceFactory,
            @Qualifier("servicesManagerCache")
            final Cache<Long, RegisteredService> servicesManagerCache,
            final List<ServicesManagerRegisteredServiceLocator> servicesManagerRegisteredServiceLocators,
            final Environment environment,
            final ConfigurableApplicationContext applicationContext) {

            AnnotationAwareOrderComparator.sortIfNecessary(servicesManagerRegisteredServiceLocators);
            val activeProfiles = Arrays.stream(environment.getActiveProfiles()).collect(Collectors.toSet());
            return ServicesManagerConfigurationContext
                .builder()
                .serviceRegistry(serviceRegistry)
                .applicationContext(applicationContext)
                .environments(activeProfiles)
                .servicesCache(servicesManagerCache)
                .registeredServicesTemplatesManager(registeredServicesTemplatesManager)
                .registeredServiceLocators(servicesManagerRegisteredServiceLocators)
                .casProperties(casProperties)
                .tenantExtractor(tenantExtractor)
                .serviceFactory(serviceFactory)
                .registeredServiceIndexService(registeredServiceIndexService)
                .build();
        }
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