fix:fix polaris_namespace is null when using TSF.

Haotian Zhang 2 months ago
parent 321b7d77fe
commit 3558f2f757

@ -13,3 +13,4 @@
- fix:fix ipv6 instance not found bug. - fix:fix ipv6 instance not found bug.
- fix:fix tsf lossless not working bug. - fix:fix tsf lossless not working bug.
- fix:fix RestTemplate trace attribute loss 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)) { if (StringUtils.isBlank(tsfNamespaceId)) {
LOGGER.error("tsf_namespace_id is empty"); 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 // context
defaultProperties.put("spring.cloud.polaris.enabled", "true"); defaultProperties.put("spring.cloud.polaris.enabled", "true");

Loading…
Cancel
Save