From 7690f0798a1adac5ffb075377d57bf95f67236d6 Mon Sep 17 00:00:00 2001 From: jingsenzhou Date: Fri, 26 Aug 2022 15:49:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?sentinel=20nacos=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../csp/sentinel/dashboard/rule/nacos/SentinelConfig.java | 3 +++ 1 file changed, 3 insertions(+) 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); } } 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 2/2] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=94=E8=AF=A5=E5=8C=85=E6=8B=AC=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=9A=84java=E7=B1=BB-=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=8F=AA=E6=89=AB=E6=8F=8F?= =?UTF-8?q?=E6=9E=9A=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);