com.taobao.diamond.client.impl.TenantUtil Maven / Gradle / Ivy
package com.taobao.diamond.client.impl;
import com.taobao.diamond.utils.StringUtils;
public class TenantUtil {
static String defaultTenant = "";
static String userTenant = "";
static {
defaultTenant = System.getProperty("DIAMOND_DEFAULT_TENANT", "");
userTenant = System.getProperty("tenant.id", "");
if (StringUtils.isBlank(userTenant)) {
userTenant = System.getProperty("acm.namespace", "");
}
}
public static String getDefaultTenant() {
return defaultTenant;
}
public static String getUserTenant() {
return userTenant;
}
public static void setUserTenant(String userTenant) {
TenantUtil.userTenant = userTenant;
}
}