mirror of
https://gitee.com/dromara/sa-token.git
synced 2024-11-30 10:58:05 +08:00
修改插件名称:sa-token-dao-redis-string -> sa-token-dao-redis-fastjson
This commit is contained in:
parent
f0b49b451a
commit
3addd684d6
@ -21,8 +21,8 @@
|
||||
<module>sa-token-alone-redis</module>
|
||||
<module>sa-token-dao-redis</module>
|
||||
<module>sa-token-dao-redis-jackson</module>
|
||||
<module>sa-token-dao-redis-fastjson</module>
|
||||
<module>sa-token-dao-redisx</module>
|
||||
<module>sa-token-dao-redis-string</module>
|
||||
<module>sa-token-dialect-thymeleaf</module>
|
||||
<module>sa-token-sso</module>
|
||||
<module>sa-token-oauth2</module>
|
||||
|
@ -10,7 +10,7 @@
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>sa-token-dao-redix-string</artifactId>
|
||||
<artifactId>sa-token-dao-redis-fastjson</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!-- sa-token-spring-boot-starter -->
|
@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
|
||||
*
|
||||
*/
|
||||
@Component
|
||||
public class SaTokenDaoRedisString implements SaTokenDao {
|
||||
public class SaTokenDaoRedisFastjson implements SaTokenDao {
|
||||
|
||||
/**
|
||||
* String专用
|
||||
@ -29,7 +29,7 @@ public class SaTokenDaoRedisString implements SaTokenDao {
|
||||
public StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
/**
|
||||
* Objecy专用
|
||||
* Object专用
|
||||
*/
|
||||
public StringRedisTemplate objectRedisTemplate;
|
||||
|
||||
@ -40,6 +40,11 @@ public class SaTokenDaoRedisString implements SaTokenDao {
|
||||
|
||||
@Autowired
|
||||
public void init(RedisConnectionFactory connectionFactory) {
|
||||
// 不重复初始化
|
||||
if(this.isInit) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 指定相应的序列化方案
|
||||
StringRedisSerializer keySerializer = new StringRedisSerializer();
|
||||
StringRedisSerializer valueSerializer = new StringRedisSerializer();
|
||||
@ -57,11 +62,9 @@ public class SaTokenDaoRedisString implements SaTokenDao {
|
||||
template.afterPropertiesSet();
|
||||
|
||||
// 开始初始化相关组件
|
||||
if(!this.isInit) {
|
||||
this.stringRedisTemplate = stringTemplate;
|
||||
this.objectRedisTemplate = template;
|
||||
this.isInit = true;
|
||||
}
|
||||
this.stringRedisTemplate = stringTemplate;
|
||||
this.objectRedisTemplate = template;
|
||||
this.isInit = true;
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.dev33.satoken.dao.SaTokenDaoRedisString
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=cn.dev33.satoken.dao.SaTokenDaoRedisFastjson
|
@ -69,6 +69,10 @@ public class SaTokenDaoRedisJackson implements SaTokenDao {
|
||||
|
||||
@Autowired
|
||||
public void init(RedisConnectionFactory connectionFactory) {
|
||||
// 不重复初始化
|
||||
if(this.isInit) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 指定相应的序列化方案
|
||||
StringRedisSerializer keySerializer = new StringRedisSerializer();
|
||||
@ -112,11 +116,9 @@ public class SaTokenDaoRedisJackson implements SaTokenDao {
|
||||
template.afterPropertiesSet();
|
||||
|
||||
// 开始初始化相关组件
|
||||
if(this.isInit == false) {
|
||||
this.stringRedisTemplate = stringTemplate;
|
||||
this.objectRedisTemplate = template;
|
||||
this.isInit = true;
|
||||
}
|
||||
this.stringRedisTemplate = stringTemplate;
|
||||
this.objectRedisTemplate = template;
|
||||
this.isInit = true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,6 +41,11 @@ public class SaTokenDaoRedis implements SaTokenDao {
|
||||
|
||||
@Autowired
|
||||
public void init(RedisConnectionFactory connectionFactory) {
|
||||
// 不重复初始化
|
||||
if(this.isInit) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 指定相应的序列化方案
|
||||
StringRedisSerializer keySerializer = new StringRedisSerializer();
|
||||
JdkSerializationRedisSerializer valueSerializer = new JdkSerializationRedisSerializer();
|
||||
@ -58,11 +63,9 @@ public class SaTokenDaoRedis implements SaTokenDao {
|
||||
template.afterPropertiesSet();
|
||||
|
||||
// 开始初始化相关组件
|
||||
if(this.isInit == false) {
|
||||
this.stringRedisTemplate = stringTemplate;
|
||||
this.objectRedisTemplate = template;
|
||||
this.isInit = true;
|
||||
}
|
||||
this.stringRedisTemplate = stringTemplate;
|
||||
this.objectRedisTemplate = template;
|
||||
this.isInit = true;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user