mirror of
https://gitee.com/dcren/cloud-native-app-initializer.git
synced 2026-05-19 17:31:28 +08:00
@@ -34,6 +34,7 @@ import java.net.URL;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -56,6 +57,11 @@ public class ClasspathTemplateLoader implements CodeTemplateRepoLoader {
|
||||
|
||||
Path rootPath = Paths.get(uri.getPath());
|
||||
|
||||
Resource rootResource = resourceLoader.getResource(CLASSPAHT_PREFIX + rootPath);
|
||||
if (!rootResource.exists()) {
|
||||
return new CodeTemplateRepo(uri, Collections.emptyList());
|
||||
}
|
||||
|
||||
Resource[] resources = resourceLoader.getResources(CLASSPAHT_PREFIX + rootPath + "/**");
|
||||
|
||||
List<CodeTemplate> templates = Arrays.stream(resources)
|
||||
|
||||
Reference in New Issue
Block a user