mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-05-03 20:27:54 +08:00
commit
43c9452fb2
@ -19,12 +19,14 @@ import cn.dev33.satoken.session.SaSession;
|
|||||||
import cn.dev33.satoken.util.SaFoxUtil;
|
import cn.dev33.satoken.util.SaFoxUtil;
|
||||||
import org.noear.snack.ONode;
|
import org.noear.snack.ONode;
|
||||||
|
|
||||||
|
//todo: 不能删;为保持与旧的序列化兼容
|
||||||
/**
|
/**
|
||||||
* Snack3 定制版 SaSession,重写类型转换API
|
* Snack3 定制版 SaSession,重写类型转换API
|
||||||
*
|
*
|
||||||
* @author noear
|
* @author noear
|
||||||
* @since 1.34.0
|
* @since 1.34.0
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SaSessionForJson extends SaSession {
|
public class SaSessionForJson extends SaSession {
|
||||||
|
|
||||||
private static final long serialVersionUID = -7600983549653130681L;
|
private static final long serialVersionUID = -7600983549653130681L;
|
||||||
|
@ -44,7 +44,7 @@ public class SaTokenDaoOfRedisJson implements SaTokenDao {
|
|||||||
redisBucket = redisClient.getBucket();
|
redisBucket = redisClient.getBucket();
|
||||||
|
|
||||||
// 重写 SaSession 生成策略
|
// 重写 SaSession 生成策略
|
||||||
SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId);
|
//SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,12 +19,14 @@ import cn.dev33.satoken.session.SaSession;
|
|||||||
import cn.dev33.satoken.util.SaFoxUtil;
|
import cn.dev33.satoken.util.SaFoxUtil;
|
||||||
import org.noear.snack.ONode;
|
import org.noear.snack.ONode;
|
||||||
|
|
||||||
|
//todo: 不能删;为保持与旧的序列化兼容
|
||||||
/**
|
/**
|
||||||
* Snack3 定制版 SaSession,重写类型转换API
|
* Snack3 定制版 SaSession,重写类型转换API
|
||||||
*
|
*
|
||||||
* @author noear
|
* @author noear
|
||||||
* @since 1.12
|
* @since 1.12
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SaSessionForJson extends SaSession {
|
public class SaSessionForJson extends SaSession {
|
||||||
|
|
||||||
private static final long serialVersionUID = -7600983549653130681L;
|
private static final long serialVersionUID = -7600983549653130681L;
|
||||||
|
@ -45,8 +45,7 @@ public class SaTokenDaoOfRedisJson implements SaTokenDao {
|
|||||||
redisBucket = redisClient.getBucket();
|
redisBucket = redisClient.getBucket();
|
||||||
|
|
||||||
// 重写 SaSession 生成策略
|
// 重写 SaSession 生成策略
|
||||||
SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId);
|
//SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user