mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-02-27 16:50:24 +08:00
v1.20.0 更新
This commit is contained in:
@@ -14,7 +14,7 @@ Sa-token默认将会话数据保存在内存中,此模式读写速度最快,
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-dao-redis</artifactId>
|
||||
<version>1.19.0</version>
|
||||
<version>1.20.0</version>
|
||||
</dependency>
|
||||
```
|
||||
优点:兼容性好,缺点:Session序列化后基本不可读,对开发者来讲等同于乱码
|
||||
@@ -26,7 +26,7 @@ Sa-token默认将会话数据保存在内存中,此模式读写速度最快,
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-dao-redis-jackson</artifactId>
|
||||
<version>1.19.0</version>
|
||||
<version>1.20.0</version>
|
||||
</dependency>
|
||||
```
|
||||
优点:Session序列化后可读性强,可灵活手动修改,缺点:兼容性稍差
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
``` java
|
||||
// 标记当前会话登录的账号id
|
||||
// 建议的参数类型:long | int | String, 不可以传入复杂类型,如:User、Admin等等
|
||||
StpUtil.login(Object id);
|
||||
StpUtil.login(Object id);
|
||||
|
||||
// 当前会话注销登录
|
||||
StpUtil.logout();
|
||||
|
||||
@@ -33,7 +33,7 @@ public class StpUserUtil {
|
||||
/**
|
||||
* 账号体系标识
|
||||
*/
|
||||
public static final String KEY = "user"; // 将 LoginType 从`login`改为`user`
|
||||
public static final String TYPE = "user"; // 将 LoginType 从`login`改为`user`
|
||||
|
||||
// 其它代码 ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user