


package com.tuoheng.common.core.utils;


/**
 * @Author xiaoying
 * @Date 2022/10/31 11:01
 */


public class ThreadLocalUtil {

    private final static ThreadLocal<Object> USER_THREAD_LOCAL = new ThreadLocal<>();

    // 存放
    public static void set(Object user) {
        USER_THREAD_LOCAL.set(user);
    }

    // 获取
    public static Object get() {
        return USER_THREAD_LOCAL.get();
    }

    // 移除
    public static void remove() {
        USER_THREAD_LOCAL.remove();
    }
}



