@@ -0,0 +1,1165 @@
+package de.morphbit.thymeleaf.helper;%0A%0Aimport java.io.File;%0Aimport java.net.URL;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class ResourcePathFinder %7B%0A%0A%09private final String directory;%0A%09private final ClassLoader loader;%0A%0A%09public ResourcePathFinder(String directory) %7B%0A%09%09this.directory = directory;%0A%09%09this.loader = Thread.currentThread().getContextClassLoader();%0A%09%7D%0A%0A%09public List%3CString%3E findResourceFiles(boolean recursively) %7B%0A%09%09return getResourceFiles(directory, new ArrayList%3C%3E(), recursively);%0A%09%7D%0A%0A%09private List%3CString%3E getResourceFiles(String dir, List%3CString%3E files,%0A%09        boolean recursively) %7B%0A%09%09URL url = loader.getResource(dir);%0A%09%09String path = url.getPath();%0A%09%09for (File file : new File(path).listFiles()) %7B%0A%09%09%09if (recursively && file.isDirectory()) %7B%0A%09%09%09%09return getResourceFiles(concatPath(dir, file.getName()), files,%0A%09%09%09%09    recursively);%0A%09%09%09%7D else %7B%0A%09%09%09%09files.add(concatPath(dir, file.getName()));%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return files;%0A%09%7D%0A%0A%09private String concatPath(String path1, String path2) %7B%0A%09%09if (path1 == null) %7B%0A%09%09%09return path2;%0A%09%09%7D%0A%09%09return path1.replaceAll(%22%5B/%7C%5C%5C%5C%5C%5D*$%22, %22%22) + %22/%22%0A%09%09        + path2.replaceAll(%22%5E%5B/%7C%5C%5C%5C%5C%5D*%22, %22%22);%0A%09%7D%0A%7D%0A

Add helper class to find resource files