mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
完善单元测试
This commit is contained in:
@@ -9,6 +9,9 @@ import cn.dev33.satoken.SaManager;
|
||||
*/
|
||||
public class SaTempUtil {
|
||||
|
||||
private SaTempUtil() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据value创建一个token
|
||||
* @param value 指定值
|
||||
|
||||
@@ -108,6 +108,17 @@ public class SaResult extends LinkedHashMap<String, Object> implements Serializa
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个值 根据自定义key
|
||||
* @param <T> 要转换为的类型
|
||||
* @param key key
|
||||
* @param cs 要转换为的类型
|
||||
* @return 值
|
||||
*/
|
||||
public <T> T get(String key, Class<T> cs) {
|
||||
return SaFoxUtil.getValueByType(get(key), cs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 写入一个Map, 连缀风格
|
||||
* @param map map
|
||||
|
||||
Reference in New Issue
Block a user