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); diff --git a/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/SentinelConfig.java b/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/SentinelConfig.java index 8326ae99..de9450e0 100644 --- a/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/SentinelConfig.java +++ b/jeecg-server-cloud/jeecg-visual/jeecg-cloud-sentinel/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/SentinelConfig.java @@ -157,6 +157,9 @@ public class SentinelConfig { if(StringUtils.isNotBlank(nacosConfigProperties.getPassword())){ properties.put(PropertyKeyConst.PASSWORD,nacosConfigProperties.getPassword()); } + if(StringUtils.isNotBlank(nacosConfigProperties.getNamespace())){ + properties.put(PropertyKeyConst.NAMESPACE,nacosConfigProperties.getNamespace()); + } return ConfigFactory.createConfigService(properties); } }