All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.houbbbbb.sso.util.ThreadLocalUtil Maven / Gradle / Ivy

The newest version!
package com.github.houbbbbb.sso.util;

/**
 * @author: hbw
 * @date: 2020/7/31
 **/
public class ThreadLocalUtil {
    private ThreadLocalUtil() {}

    private static final ThreadLocal TL = new ThreadLocal<>();
    public static void set (String value) {
        TL.set(value);
    }
    public static String get () {
        String value = TL.get();
        if (null != value) {
            TL.remove();
        }
        return value;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy