类 SaTokenDaoForRedisTemplate

java.lang.Object
cn.dev33.satoken.dao.SaTokenDaoForRedisTemplate
所有已实现的接口:
cn.dev33.satoken.dao.auto.SaTokenDaoByObjectFollowString, cn.dev33.satoken.dao.auto.SaTokenDaoBySessionFollowObject, cn.dev33.satoken.dao.SaTokenDao

public class SaTokenDaoForRedisTemplate extends Object implements cn.dev33.satoken.dao.auto.SaTokenDaoByObjectFollowString
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
    get(String key)
    获取Value,如无返空
    long
    获取Value的剩余存活时间 (单位: 秒)
    void
    init(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
     
    protected void
    initMore(org.springframework.data.redis.connection.RedisConnectionFactory connectionFactory)
     
    searchData(String prefix, String keyword, int start, int size, boolean sortType)
    搜索数据
    void
    set(String key, String value, long timeout)
    写入Value,并设定存活时间 (单位: 秒)
    void
    update(String key, String value)
    修改指定key-value键值对 (过期时间不变)
    void
    updateTimeout(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

      public String get(String key)
      获取Value,如无返空
      指定者:
      get 在接口中 cn.dev33.satoken.dao.SaTokenDao
    • set

      public void set(String key, String value, long timeout)
      写入Value,并设定存活时间 (单位: 秒)
      指定者:
      set 在接口中 cn.dev33.satoken.dao.SaTokenDao
    • update

      public void update(String key, String value)
      修改指定key-value键值对 (过期时间不变)
      指定者:
      update 在接口中 cn.dev33.satoken.dao.SaTokenDao
    • delete

      public void delete(String key)
      删除Value
      指定者:
      delete 在接口中 cn.dev33.satoken.dao.SaTokenDao
    • getTimeout

      public long getTimeout(String key)
      获取Value的剩余存活时间 (单位: 秒)
      指定者:
      getTimeout 在接口中 cn.dev33.satoken.dao.SaTokenDao
    • updateTimeout

      public void updateTimeout(String key, long timeout)
      修改Value的剩余存活时间 (单位: 秒)
      指定者:
      updateTimeout 在接口中 cn.dev33.satoken.dao.SaTokenDao
    • searchData

      public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType)
      搜索数据
      指定者:
      searchData 在接口中 cn.dev33.satoken.dao.SaTokenDao