diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a811f43e..316283464 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,3 +22,4 @@
- [feat:support consul config.](https://github.com/Tencent/spring-cloud-tencent/pull/1410)
- [feat:add trace report support.](https://github.com/Tencent/spring-cloud-tencent/pull/1411)
- [fix: fix lossless test case unstable issues.](https://github.com/Tencent/spring-cloud-tencent/pull/1412)
+- [feat:support consul service update task.](https://github.com/Tencent/spring-cloud-tencent/pull/1413)
diff --git a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisAutoServiceRegistration.java b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisAutoServiceRegistration.java
index 96b359096..563ec8ef6 100644
--- a/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisAutoServiceRegistration.java
+++ b/spring-cloud-starter-tencent-polaris-discovery/src/main/java/com/tencent/cloud/polaris/registry/PolarisAutoServiceRegistration.java
@@ -17,9 +17,7 @@
package com.tencent.cloud.polaris.registry;
-import com.tencent.cloud.common.metadata.MetadataContext;
import com.tencent.cloud.polaris.PolarisDiscoveryProperties;
-import com.tencent.polaris.api.pojo.ServiceKey;
import com.tencent.polaris.assembly.api.AssemblyAPI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -73,9 +71,6 @@ public class PolarisAutoServiceRegistration extends AbstractAutoServiceRegistrat
LOGGER.debug("Registration disabled.");
return;
}
- if (assemblyAPI != null) {
- assemblyAPI.initService(new ServiceKey(MetadataContext.LOCAL_NAMESPACE, MetadataContext.LOCAL_SERVICE));
- }
super.register();
}
diff --git a/spring-cloud-tencent-dependencies/pom.xml b/spring-cloud-tencent-dependencies/pom.xml
index caffb6532..59aeffbe0 100644
--- a/spring-cloud-tencent-dependencies/pom.xml
+++ b/spring-cloud-tencent-dependencies/pom.xml
@@ -74,7 +74,7 @@
1.14.0-2023.0.0-RC2
- 1.15.7-SNAPSHOT
+ 1.15.8-SNAPSHOT
32.0.1-jre
diff --git a/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml b/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml
index ca0dc4358..6c839dd70 100644
--- a/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml
+++ b/spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml
@@ -14,7 +14,17 @@
com.tencent.cloud
- spring-cloud-starter-tencent-all
+ spring-cloud-starter-tencent-polaris-discovery
+
+
+
+ com.tencent.cloud
+ spring-cloud-starter-tencent-polaris-config
+
+
+
+ com.tencent.cloud
+ spring-cloud-starter-tencent-polaris-contract
diff --git a/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml b/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml
index 202b268a8..f5ed608fc 100644
--- a/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml
+++ b/spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml
@@ -14,7 +14,17 @@
com.tencent.cloud
- spring-cloud-starter-tencent-all
+ spring-cloud-starter-tencent-polaris-discovery
+
+
+
+ com.tencent.cloud
+ spring-cloud-starter-tencent-polaris-config
+
+
+
+ com.tencent.cloud
+ spring-cloud-starter-tencent-polaris-contract
diff --git a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java
index 05a706c68..1ebd2d2bc 100644
--- a/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java
+++ b/spring-cloud-tencent-polaris-context/src/main/java/com/tencent/cloud/polaris/context/tsf/env/TsfCoreEnvironmentPostProcessor.java
@@ -77,6 +77,9 @@ public final class TsfCoreEnvironmentPostProcessor implements EnvironmentPostPro
if (StringUtils.isBlank(tsfNamespaceId)) {
LOGGER.error("tsf_namespace_id is empty");
}
+ else {
+ defaultProperties.put("spring.cloud.polaris.namespace", tsfNamespaceId);
+ }
// tsf_consul_ip
String tsfConsulIp = environment.getProperty("tsf_consul_ip");