mirror of
https://gitee.com/dromara/sa-token.git
synced 2026-05-14 12:52:08 +08:00
refactor: 重构 sa-token-redis-template-jdk-serializer 插件
This commit is contained in:
@@ -13,15 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.dev33.satoken.dao.impl;
|
||||
package cn.dev33.satoken.dao;
|
||||
|
||||
import cn.dev33.satoken.dao.SaTokenDao;
|
||||
import cn.dev33.satoken.dao.auto.SaTokenDaoByObjectFollowStringUseJsonSerializer;
|
||||
import cn.dev33.satoken.util.SaFoxUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -34,7 +32,6 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author click33
|
||||
* @since 1.34.0
|
||||
*/
|
||||
@Component
|
||||
public class SaTokenDaoForRedisTemplate implements SaTokenDaoByObjectFollowStringUseJsonSerializer {
|
||||
|
||||
public StringRedisTemplate stringRedisTemplate;
|
||||
@@ -57,11 +54,17 @@ public class SaTokenDaoForRedisTemplate implements SaTokenDaoByObjectFollowStrin
|
||||
stringTemplate.afterPropertiesSet();
|
||||
this.stringRedisTemplate = stringTemplate;
|
||||
|
||||
initMore(connectionFactory);
|
||||
|
||||
// 打上标记,表示已经初始化成功,后续无需再重新初始化
|
||||
this.isInit = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void initMore(RedisConnectionFactory connectionFactory) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取Value,如无返空
|
||||
*/
|
||||
@@ -1 +1 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.dev33.satoken.dao.impl.SaTokenDaoForRedisTemplate
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.dev33.satoken.dao.SaTokenDaoForRedisTemplate
|
||||
@@ -1 +1 @@
|
||||
cn.dev33.satoken.dao.impl.SaTokenDaoForRedisTemplate
|
||||
cn.dev33.satoken.dao.SaTokenDaoForRedisTemplate
|
||||
Reference in New Issue
Block a user