@ConditionalOnMissingBean(name = "googleMapsGeoLocationService")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public GeoLocationService googleMapsGeoLocationService(final CasConfigurationProperties casProperties) {
        val builder = new GeoApiContext.Builder();
        val properties = casProperties.getGeoLocation().getGoogleMaps();
        if (properties.isGoogleAppsEngine()) {
            builder.requestHandlerBuilder(new GaeRequestHandler.Builder());
        }
        if (StringUtils.isNotBlank(properties.getClientId()) && StringUtils.isNotBlank(properties.getClientSecret())) {
            builder.enterpriseCredentials(properties.getClientId(), properties.getClientSecret());
        }
        val context = builder.apiKey(properties.getApiKey())
            .connectTimeout(Beans.newDuration(properties.getConnectTimeout()).toMillis(), TimeUnit.MILLISECONDS)
            .build();
        return new GoogleMapsGeoLocationService(context);
    }
This is {@link CasGoogleMapsGeoCodingAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-geolocation-googlemaps/src/main/java/org/apereo/cas/config/CasGoogleMapsGeoCodingAutoConfiguration.java