public static File getFile(String resourceLocation) throws FileNotFoundException {
        Assert.notNull(resourceLocation, "Resource location must not be null");
        if (resourceLocation.startsWith(CLASSPATH_URL_PREFIX)) {
            String path = resourceLocation.substring(CLASSPATH_URL_PREFIX.length());
            String description = "class path resource [" + path + "]";
            URL url = ClassUtils.getDefaultClassLoader().getResource(path);
            if (url == null) {
                throw new FileNotFoundException(
                        description + " cannot be resolved to absolute file path " +
                                "because it does not reside in the file system"
                );
            }
            return getFile(url, description);
        }
        try {
            // try URL
            return getFile(new URL(resourceLocation));
        } catch (MalformedURLException ex) {
            // no URL -> treat as file path
            return new File(resourceLocation);
        }
    }
Resolve the given resource location to a {@code java.io.File},
i.e. to a file in the file system.
<p>Does not check whether the file actually exists; simply returns
the File that the given location would correspond to.

@param resourceLocation the resource location to resolve: either a
                        "classpath:" pseudo URL, a "file:" URL, or a plain file path
@return a corresponding File object
@throws FileNotFoundException if the resource cannot be resolved to
                              a file in the file system
src/main/java/spark/utils/ResourceUtils.java