@ConditionalOnMissingBean(name = "groovyRegisteredServiceAccessStrategyEnforcer")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @ConditionalOnMissingGraalVMNativeImage
        public RegisteredServiceAccessStrategyEnforcer groovyRegisteredServiceAccessStrategyEnforcer(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(RegisteredServiceAccessStrategyEnforcer.class)
                .when(BeanCondition.on("cas.access-strategy.groovy.location").exists()
                    .given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val location = casProperties.getAccessStrategy().getGroovy().getLocation();
                    val scriptFactory = ExecutableCompiledScriptFactory.getExecutableCompiledScriptFactory();
                    return new GroovyRegisteredServiceAccessStrategyEnforcer(scriptFactory.fromResource(location));
                })
                .otherwiseProxy()
                .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