From 557cf7890e4fa64540f3a7e3785e848735554432 Mon Sep 17 00:00:00 2001 From: Haotian Zhang Date: Thu, 6 Jun 2024 11:17:04 +0800 Subject: [PATCH] fix:fix no registry when lossless is disabled. (#1311) --- CHANGELOG.md | 1 + pom.xml | 2 +- spring-cloud-tencent-dependencies/pom.xml | 2 +- .../tencent/cloud/plugin/lossless/LosslessRegistryAspect.java | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4421d2e5d..1c94fe6b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,3 +15,4 @@ - [fix: fix lossless deregister failed when no healthcheck configured](https://github.com/Tencent/spring-cloud-tencent/pull/1281) - [fix:fix ApplicationContextAwareUtils NPE bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1293) - [feat:upgrade jacoco version.](https://github.com/Tencent/spring-cloud-tencent/pull/1309) +- [fix:fix no registry when lossless is disabled.](https://github.com/Tencent/spring-cloud-tencent/pull/1311) diff --git a/pom.xml b/pom.xml index ee3857784..c882ce590 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ - 1.14.0-2022.0.5.RC1 + 1.14.0-2022.0.5-SNAPSHOT 6.0.17 diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml index 337e90b76..d89dca900 100644 --- a/spring-cloud-tencent-dependencies/pom.xml +++ b/spring-cloud-tencent-dependencies/pom.xml @@ -71,7 +71,7 @@ - 1.14.0-2022.0.5.RC1 + 1.14.0-2022.0.5-SNAPSHOT 1.15.6 diff --git a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/src/main/java/com/tencent/cloud/plugin/lossless/LosslessRegistryAspect.java b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/src/main/java/com/tencent/cloud/plugin/lossless/LosslessRegistryAspect.java index c9af94576..9dab0f243 100644 --- a/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/src/main/java/com/tencent/cloud/plugin/lossless/LosslessRegistryAspect.java +++ b/spring-cloud-tencent-plugin-starters/spring-cloud-tencent-lossless-plugin/src/main/java/com/tencent/cloud/plugin/lossless/LosslessRegistryAspect.java @@ -73,6 +73,9 @@ public class LosslessRegistryAspect { @Around("registerPointcut()") public Object invokeRegister(ProceedingJoinPoint joinPoint) throws Throwable { + if (!losslessProperties.isEnabled()) { + return joinPoint.proceed(); + } // web started, get port from registration BaseInstance instance = SpringCloudLosslessActionProvider.getBaseInstance(registration, registrationTransformer);