set换为list否则会丢失一些信息
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user