mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-04-05 17:37:53 +08:00
update sa-token-doc/doc/use/session.md.
文档中有这个方法的使用, 但是没有提前说明 https://sa-token.dev33.cn/doc/index.html#/fun/jur-cache
This commit is contained in:
parent
563c0ff7b7
commit
409ae8014a
@ -86,6 +86,11 @@ session.get("name");
|
||||
// 取值 (指定默认值)
|
||||
session.get("name", "<defaultValue>");
|
||||
|
||||
// 取值 (若无值则执行参数方法, 之后将结果保存到此键名下,并返回此结果 若有值则直接返回, 无需执行参数方法)
|
||||
session.get("name", () -> {
|
||||
return ...;
|
||||
});
|
||||
|
||||
// ---------- 数据类型转换: ----------
|
||||
session.getInt("age"); // 取值 (转int类型)
|
||||
session.getLong("age"); // 取值 (转long类型)
|
||||
|
Loading…
Reference in New Issue
Block a user