From e0db352f58e9d5e6a7706b5e2274c01ac039a699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=90=A6=E6=B6=9B?= Date: Mon, 6 Mar 2023 15:00:32 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=20sonar=E3=80=91JeroCloudCondition?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/jero/config/JeroCloudCondition.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/JeroCloudCondition.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/JeroCloudCondition.java index ff33e8c0..a8e8f65c 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/JeroCloudCondition.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/config/JeroCloudCondition.java @@ -14,9 +14,6 @@ public class JeroCloudCondition implements Condition { public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { Object object = context.getEnvironment().getProperty(CommonConstant.CLOUD_SERVER_KEY); //如果没有服务注册发现的配置 说明是单体应用 - if(object==null){ - return false; - } - return true; + return object != null; } }