@ConditionalOnMissingBean(name = "groovyGeoLocationService")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @ConditionalOnMissingGraalVMNativeImage
        public GeoLocationService groovyGeoLocationService(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(GeoLocationService.class)
                .when(BeanCondition.on("cas.geo-location.groovy.location").exists().given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val scriptFactory = ExecutableCompiledScriptFactory.getExecutableCompiledScriptFactory();
                    val resource = scriptFactory.fromResource(casProperties.getGeoLocation().getGroovy().getLocation());
                    return new GroovyGeoLocationService(resource, applicationContext);
                })
                .otherwiseProxy()
                .get();
        }
This is {@link CasGeoLocationAutoConfiguration}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-geolocation/src/main/java/org/apereo/cas/config/CasGeoLocationAutoConfiguration.java