wuzeyu
2024-06-19 fdacd6f57d9ace487ee017c0a58de0a66075c9ca
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();
    }
}