private static boolean isInvalidPath(String path) {
        if (path.contains("WEB-INF") || path.contains("META-INF")) {
            return true;
        }
        if (path.contains(":/")) {
            String relativePath = (path.charAt(0) == '/' ? path.substring(1) : path);
            if (ResourceUtils.isUrl(relativePath) || relativePath.startsWith("url:")) {
                return true;
            }
        }
        if (path.contains("")) {
            path = StringUtils.cleanPath(path);
            if (path.contains("../")) {
                return true;
            }
        }
        return false;
    }
Create a new ClassPathResource for ClassLoader usage.
A leading slash will be removed, as the ClassLoader
resource access methods will not accept it.

@param path        the absolute path within the classpath
@param classLoader the class loader to load the resource with,
                   or {@code null} for the thread context class loader
@see ClassLoader#getResourceAsStream(String)
src/main/java/spark/resource/ClassPathResource.java