code: protected Resource requireResource(String path) throws IOException {
      URL url = getClass().getClassLoader().getResource(pathPrefix + path);
      if (url != null) {
        return url.getProtocol().equals("file") ?
          new FileResource(new File(URLDecoder.decode(url.getPath(), "UTF-8"))) :
          new URLResource(url);
      }
      for (File dir : directories) {
        File f = new File(dir, path).getCanonicalFile();
        if (f.exists()) {
          return new FileResource(f);
        }
      }
      throw new FileNotFoundException(path);
    }
docs: Attempts to locate the resource at the given path, and returns a wrapper which allows its data
  to be efficiently read.
  
  <p>First, the path prefix is prepended (see {@link #setPathPrefix(String)}) and the the class
  loader checked. If not found, then the extra directories, if any, are checked, in order. If
  the file is not found in any of the extra directories either, then an exception is thrown.