类 SaTokenDaoForRedisTemplate
java.lang.Object
cn.dev33.satoken.dao.SaTokenDaoForRedisTemplate
public class SaTokenDaoForRedisTemplate
extends Object
implements SaTokenDaoByObjectFollowString, SaTokenDao
Sa-Token 持久层实现 [ Redis 存储 ] (可用环境: SpringBoot2、SpringBoot3)
- 从以下版本开始:
- 1.34.0
- 作者:
- click33
-
字段概要
字段修饰符和类型字段说明boolean标记:当前 redis 连接信息是否已初始化成功org.springframework.data.redis.core.StringRedisTemplate从接口继承的字段 cn.dev33.satoken.dao.SaTokenDao
NEVER_EXPIRE, NOT_VALUE_EXPIRE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void删除Value获取Value,如无返空longgetTimeout(String key) 获取Value的剩余存活时间 (单位: 秒)voidinit(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) protected voidinitMore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) searchData(String prefix, String keyword, int start, int size, boolean sortType) 搜索数据void写入Value,并设定存活时间 (单位: 秒)void修改指定key-value键值对 (过期时间不变)voidupdateTimeout(String key, long timeout) 修改Value的剩余存活时间 (单位: 秒)从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.dev33.satoken.dao.SaTokenDao
destroy, init从接口继承的方法 cn.dev33.satoken.dao.auto.SaTokenDaoByObjectFollowString
deleteObject, getObject, getObject, getObjectTimeout, setObject, updateObject, updateObjectTimeout从接口继承的方法 cn.dev33.satoken.dao.auto.SaTokenDaoBySessionFollowObject
deleteSession, getSession, getSessionTimeout, setSession, updateSession, updateSessionTimeout
-
字段详细资料
-
stringRedisTemplate
public org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate -
isInit
public boolean isInit标记:当前 redis 连接信息是否已初始化成功
-
-
构造器详细资料
-
SaTokenDaoForRedisTemplate
public SaTokenDaoForRedisTemplate()
-
-
方法详细资料
-
init
@Autowired public void init(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) -
initMore
protected void initMore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory) -
get
获取Value,如无返空- 指定者:
get在接口中SaTokenDao
-
set
写入Value,并设定存活时间 (单位: 秒)- 指定者:
set在接口中SaTokenDao
-
update
修改指定key-value键值对 (过期时间不变)- 指定者:
update在接口中SaTokenDao
-
delete
删除Value- 指定者:
delete在接口中SaTokenDao
-
getTimeout
获取Value的剩余存活时间 (单位: 秒)- 指定者:
getTimeout在接口中SaTokenDao
-
updateTimeout
修改Value的剩余存活时间 (单位: 秒)- 指定者:
updateTimeout在接口中SaTokenDao
-
searchData
public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType) 搜索数据- 指定者:
searchData在接口中SaTokenDao
-