调整:增加core层实体扫码

This commit is contained in:
ruying408
2024-10-02 21:34:38 +08:00
parent 05c2cd33f0
commit 2c265add20

View File

@@ -28,10 +28,10 @@ public class EntityUtils {
PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
Resource[] resources = null;
try {
resources = resolver.getResources("classpath*:com/cool/modules/**/entity/**/*.class");
resources = resolver.getResources("classpath*:com/cool/**/entity/*.class");
for (Resource r : resources) {
String path = r.getURL().getPath();
String className = path.substring(path.indexOf("com/cool/modules"),
String className = path.substring(path.indexOf("com/cool"),
path.lastIndexOf('.')).replace('/', '.');
entitySet.add(className);
}