【fix sonar】TenantContext文件
This commit is contained in:
+5
-1
@@ -8,6 +8,10 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class TenantContext {
|
public class TenantContext {
|
||||||
|
|
||||||
|
private TenantContext(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static ThreadLocal<String> currentTenant = new ThreadLocal<>();
|
private static ThreadLocal<String> currentTenant = new ThreadLocal<>();
|
||||||
|
|
||||||
public static void setTenant(String tenant) {
|
public static void setTenant(String tenant) {
|
||||||
@@ -22,4 +26,4 @@ public class TenantContext {
|
|||||||
public static void clear(){
|
public static void clear(){
|
||||||
currentTenant.remove();
|
currentTenant.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user