Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:support consul service update task. #1357

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
- [feat:add Tencent Cloud TSF support.](https://github.com/Tencent/spring-cloud-tencent/pull/1350)
- [feat:support consul config.](https://github.com/Tencent/spring-cloud-tencent/pull/1352)
- [feat:add trace report support.](https://github.com/Tencent/spring-cloud-tencent/pull/1353)
- [fix: fix lossless test case unstable issues.](https://github.com/Tencent/spring-cloud-tencent/pull/1355)
- [fix: fix lossless test case unstable issues.](https://github.com/Tencent/spring-cloud-tencent/pull/1355)
- [feat:support consul service update task.](https://github.com/Tencent/spring-cloud-tencent/pull/1357)
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -73,9 +71,6 @@ protected void register() {
LOGGER.debug("Registration disabled.");
return;
}
if (assemblyAPI != null) {
assemblyAPI.initService(new ServiceKey(MetadataContext.LOCAL_NAMESPACE, MetadataContext.LOCAL_SERVICE));
}
super.register();
}

Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-tencent-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<revision>1.14.0-2021.0.9-SNAPSHOT</revision>

<!-- Polaris SDK version -->
<polaris.version>1.15.7-SNAPSHOT</polaris.version>
<polaris.version>1.15.8-SNAPSHOT</polaris.version>

<!-- Dependencies -->
<guava.version>32.0.1-jre</guava.version>
Expand Down
12 changes: 11 additions & 1 deletion spring-cloud-tencent-examples/tsf-example/consumer-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@
<dependencies>
<dependency>
<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>
Expand Down
12 changes: 11 additions & 1 deletion spring-cloud-tencent-examples/tsf-example/provider-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@
<dependencies>
<dependency>
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public void postProcessEnvironment(ConfigurableEnvironment environment, SpringAp
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");
Expand Down
Loading