private Resource prepareRegisteredServicesDirectory(final Resource configDirectory) throws IOException {
        val externalForm = configDirectory.getURI().toASCIIString();
        if (CasRuntimeHintsRegistrar.inNativeImage() && ResourceUtils.isEmbeddedResource(externalForm)) {
            val servicesDirectory = CasConfigurationPropertiesSourceLocator.DEFAULT_CAS_CONFIG_DIRECTORIES
                .stream()
                .map(directory -> new File(directory, "services"))
                .filter(File::exists)
                .findFirst()
                .orElse(FALLBACK_REGISTERED_SERVICES_LOCATION);
            LOGGER.warn("""
                GraalVM native image executable is unable to discover embedded resources at [{}]. The services directory location is changed to use [{}] instead. \
                To adjust this behavior, update your CAS settings to use a directory location outside the CAS native executable."""
                .stripIndent(), externalForm, servicesDirectory);
            return new FileSystemResource(servicesDirectory);
        }
        val pattern = String.join("|", getExtensions());
        return Objects.requireNonNull(ResourceUtils.prepareClasspathResourceIfNeeded(configDirectory, true, pattern),
            () -> "Could not determine the services configuration directory from " + configDirectory);
    }
Fallback location to use if the given location is determined as invalid.
core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/resource/AbstractResourceBasedServiceRegistry.java