From 81709bcef8ff917044bda1f0e8b88f71f7dcc9a9 Mon Sep 17 00:00:00 2001 From: noear Date: Sat, 11 May 2024 17:55:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=20SaSessionForJson=20(?= =?UTF-8?q?=E5=8F=91=E7=8E=B0=E6=B2=A1=E5=BF=85=E8=A6=81=E4=BA=86)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/dev33/satoken/dao/SaSessionForJson.java | 2 ++ .../main/java/cn/dev33/satoken/dao/SaTokenDaoOfRedisJson.java | 2 +- .../main/java/cn/dev33/satoken/solon/dao/SaSessionForJson.java | 2 ++ .../java/cn/dev33/satoken/solon/dao/SaTokenDaoOfRedisJson.java | 3 +-- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaSessionForJson.java b/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaSessionForJson.java index ce38d570..680230f9 100644 --- a/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaSessionForJson.java +++ b/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaSessionForJson.java @@ -19,12 +19,14 @@ import cn.dev33.satoken.session.SaSession; import cn.dev33.satoken.util.SaFoxUtil; import org.noear.snack.ONode; +//todo: 不能删;为保持与旧的序列化兼容 /** * Snack3 定制版 SaSession,重写类型转换API * * @author noear * @since 1.34.0 */ +@Deprecated public class SaSessionForJson extends SaSession { private static final long serialVersionUID = -7600983549653130681L; diff --git a/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaTokenDaoOfRedisJson.java b/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaTokenDaoOfRedisJson.java index 2fd2e21d..3644fc04 100644 --- a/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaTokenDaoOfRedisJson.java +++ b/sa-token-plugin/sa-token-redisx/src/main/java/cn/dev33/satoken/dao/SaTokenDaoOfRedisJson.java @@ -44,7 +44,7 @@ public class SaTokenDaoOfRedisJson implements SaTokenDao { redisBucket = redisClient.getBucket(); // 重写 SaSession 生成策略 - SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId); + //SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId); } diff --git a/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaSessionForJson.java b/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaSessionForJson.java index 4d2aa9ee..ced5e993 100644 --- a/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaSessionForJson.java +++ b/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaSessionForJson.java @@ -19,12 +19,14 @@ import cn.dev33.satoken.session.SaSession; import cn.dev33.satoken.util.SaFoxUtil; import org.noear.snack.ONode; +//todo: 不能删;为保持与旧的序列化兼容 /** * Snack3 定制版 SaSession,重写类型转换API * * @author noear * @since 1.12 */ +@Deprecated public class SaSessionForJson extends SaSession { private static final long serialVersionUID = -7600983549653130681L; diff --git a/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaTokenDaoOfRedisJson.java b/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaTokenDaoOfRedisJson.java index 45ec4f94..4b20b36a 100644 --- a/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaTokenDaoOfRedisJson.java +++ b/sa-token-starter/sa-token-solon-plugin/src/main/java/cn/dev33/satoken/solon/dao/SaTokenDaoOfRedisJson.java @@ -45,8 +45,7 @@ public class SaTokenDaoOfRedisJson implements SaTokenDao { redisBucket = redisClient.getBucket(); // 重写 SaSession 生成策略 - SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId); - + //SaStrategy.instance.createSession = (sessionId) -> new SaSessionForJson(sessionId); }