fix:fix polaris_namespace is null when using TSF.

Haotian Zhang 2 months ago
parent db2816c7d9
commit 46ab7abad5

@ -14,3 +14,4 @@
- fix:fix ipv6 instance not found bug.
- fix:fix tsf lossless not working bug.
- fix:fix RestTemplate trace attribute loss bug.
- fix:fix polaris_namespace is null when using TSF.

@ -119,6 +119,10 @@ public final class TsfCoreEnvironmentPostProcessor implements EnvironmentPostPro
if (StringUtils.isBlank(tsfNamespaceId)) {
LOGGER.error("tsf_namespace_id is empty");
}
String polarisNamespace = environment.getProperty("polaris_namespace");
if (StringUtils.isBlank(polarisNamespace) && StringUtils.isNotBlank(tsfNamespaceId)) {
defaultProperties.put("spring.cloud.polaris.namespace", tsfNamespaceId);
}
// context
defaultProperties.put("spring.cloud.polaris.enabled", "true");

Loading…
Cancel
Save