feat:support consul service update task. (#1413)

Co-authored-by: Haotian Zhang <skyebefreeman@qq.com>
pull/1415/head
Fishtail 4 months ago committed by GitHub
parent 6b3f4304c3
commit fb2971bf8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,3 +22,4 @@
- [feat:support consul config.](https://github.com/Tencent/spring-cloud-tencent/pull/1410) - [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) - [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) - [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)

@ -17,9 +17,7 @@
package com.tencent.cloud.polaris.registry; package com.tencent.cloud.polaris.registry;
import com.tencent.cloud.common.metadata.MetadataContext;
import com.tencent.cloud.polaris.PolarisDiscoveryProperties; import com.tencent.cloud.polaris.PolarisDiscoveryProperties;
import com.tencent.polaris.api.pojo.ServiceKey;
import com.tencent.polaris.assembly.api.AssemblyAPI; import com.tencent.polaris.assembly.api.AssemblyAPI;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -73,9 +71,6 @@ public class PolarisAutoServiceRegistration extends AbstractAutoServiceRegistrat
LOGGER.debug("Registration disabled."); LOGGER.debug("Registration disabled.");
return; return;
} }
if (assemblyAPI != null) {
assemblyAPI.initService(new ServiceKey(MetadataContext.LOCAL_NAMESPACE, MetadataContext.LOCAL_SERVICE));
}
super.register(); super.register();
} }

@ -74,7 +74,7 @@
<revision>1.14.0-2023.0.0-RC2</revision> <revision>1.14.0-2023.0.0-RC2</revision>
<!-- Polaris SDK version --> <!-- Polaris SDK version -->
<polaris.version>1.15.7-SNAPSHOT</polaris.version> <polaris.version>1.15.8-SNAPSHOT</polaris.version>
<!-- Dependencies --> <!-- Dependencies -->
<guava.version>32.0.1-jre</guava.version> <guava.version>32.0.1-jre</guava.version>

@ -14,7 +14,17 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.tencent.cloud</groupId> <groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-all</artifactId> <artifactId>spring-cloud-starter-tencent-polaris-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-polaris-config</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-polaris-contract</artifactId>
</dependency> </dependency>
<dependency> <dependency>

@ -14,7 +14,17 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.tencent.cloud</groupId> <groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-all</artifactId> <artifactId>spring-cloud-starter-tencent-polaris-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-polaris-config</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-starter-tencent-polaris-contract</artifactId>
</dependency> </dependency>
<dependency> <dependency>

@ -77,6 +77,9 @@ public final class TsfCoreEnvironmentPostProcessor implements EnvironmentPostPro
if (StringUtils.isBlank(tsfNamespaceId)) { if (StringUtils.isBlank(tsfNamespaceId)) {
LOGGER.error("tsf_namespace_id is empty"); LOGGER.error("tsf_namespace_id is empty");
} }
else {
defaultProperties.put("spring.cloud.polaris.namespace", tsfNamespaceId);
}
// tsf_consul_ip // tsf_consul_ip
String tsfConsulIp = environment.getProperty("tsf_consul_ip"); String tsfConsulIp = environment.getProperty("tsf_consul_ip");

Loading…
Cancel
Save