update sa-token-doc/doc/use/session.md.

文档中有这个方法的使用, 但是没有提前说明
https://sa-token.dev33.cn/doc/index.html#/fun/jur-cache
This commit is contained in:
AppleOfGray 2022-08-17 05:37:27 +00:00 committed by Gitee
parent 563c0ff7b7
commit 409ae8014a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -86,6 +86,11 @@ session.get("name");
// 取值 (指定默认值)
session.get("name", "<defaultValue>");
// 取值 (若无值则执行参数方法, 之后将结果保存到此键名下,并返回此结果 若有值则直接返回, 无需执行参数方法)
session.get("name", () -> {
return ...;
});
// ---------- 数据类型转换: ----------
session.getInt("age"); // 取值 (转int类型)
session.getLong("age"); // 取值 (转long类型)