wuzeyu
2024-07-24 9bfe85d9592a0b4f9067eb1fc3192c21c3474605
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package com.dy.common.webFilter;
 
public class UserTokenContext {
    private final static ThreadLocal<String> holder = new ThreadLocal<>();
 
    public static void set(String name) {
        holder.set(name);
    }
 
    public static String get() {
        return holder.get();
    }
 
    public static void remove() {
        holder.remove();
    }
}