mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-06-28 13:34:18 +08:00
!331 fix: 修复使用 sa-token-redis-template-jdk-serializer 时反序列化错误
Merge pull request !331 from wudp/dev
This commit is contained in:
commit
75eb78494b
@ -62,6 +62,18 @@ public class SaTokenDaoForRedisTemplateUseJdkSerializer extends SaTokenDaoForRed
|
|||||||
return objectRedisTemplate.opsForValue().get(key);
|
return objectRedisTemplate.opsForValue().get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 Object (指定反序列化类型),如无返空
|
||||||
|
*
|
||||||
|
* @param key 键名称
|
||||||
|
* @return object
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
@Override
|
||||||
|
public <T> T getObject(String key, Class<T> classType) {
|
||||||
|
return (T) objectRedisTemplate.opsForValue().get(key);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 写入Object,并设定存活时间 (单位: 秒)
|
* 写入Object,并设定存活时间 (单位: 秒)
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user