set换为list否则会丢失一些信息

This commit is contained in:
thinkgem
2021-06-09 20:58:30 +08:00
parent b2070a595a
commit 0d6b667ef4

View File

@@ -35,14 +35,14 @@ public class FileTempleteUtils {
* @param path 前缀路径 * @param path 前缀路径
*/ */
public static List<FileTemplete> getFileTempleteListByPath(String path) throws IOException { public static List<FileTemplete> getFileTempleteListByPath(String path) throws IOException {
Set<FileTemplete> set = SetUtils.newTreeSet(); List<FileTemplete> list = ListUtils.newArrayList();
Resource[] resources = ResourceUtils.getResources("classpath*:" + path + "/**/*.html"); Resource[] resources = ResourceUtils.getResources("classpath*:" + path + "/**/*.html");
for (Resource resource : resources) { for (Resource resource : resources) {
if (resource.exists()) { if (resource.exists()) {
set.add(new FileTemplete(resource, path)); list.add(new FileTemplete(resource, path));
} }
} }
return ListUtils.newArrayList(set); return list;
} }
/** /**