package com.cl.common.context;
|
|
import com.cl.pojo.entity.User;
|
|
import java.util.Map;
|
|
public class BaseContext {
|
|
public static ThreadLocal<User> threadLocal = new ThreadLocal<>();
|
|
public static void setCurrentUser(User user) {
|
threadLocal.set(user);
|
}
|
public static User getCurrentUser() {
|
return threadLocal.get();
|
}
|
|
public static void removeCurrentPhone() {
|
threadLocal.remove();
|
}
|
|
}
|