From 53b670befd684260654faa81497aeece1606d392 Mon Sep 17 00:00:00 2001 From: chengyangwang <1223440313@qq.com> Date: Wed, 31 Aug 2022 11:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=AD=97=E5=85=B8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=94=E8=AF=A5=E5=8C=85=E6=8B=AC=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=9A=84java=E7=B1=BB-=E6=9E=9A=E4=B8=BE=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=8F=AA=E6=89=AB=E6=8F=8F=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jeecg/common/system/util/ResourceUtil.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/ResourceUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/ResourceUtil.java index d3260c68..de9f3318 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/ResourceUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/ResourceUtil.java @@ -36,6 +36,12 @@ public class ResourceUtil { */ private final static String CLASS_PATTERN="/**/*.class"; + /** + * 所有枚举java类 + */ + + private final static String CLASS_ENMU_PATTERN="/**/*Enum.class"; + /** * 包路径 org.jeecg */ @@ -55,7 +61,7 @@ public class ResourceUtil { return enumDictData; } ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(); - String pattern = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + ClassUtils.convertClassNameToResourcePath(BASE_PACKAGE) + CLASS_PATTERN; + String pattern = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + ClassUtils.convertClassNameToResourcePath(BASE_PACKAGE) + CLASS_ENMU_PATTERN; try { Resource[] resources = resourcePatternResolver.getResources(pattern); MetadataReaderFactory readerFactory = new CachingMetadataReaderFactory(resourcePatternResolver);