简化 redis 和 rpc 相关集成包的包名

This commit is contained in:
click33 2023-05-14 01:31:10 +08:00
parent 4d954f12f4
commit 387af986c6
79 changed files with 68 additions and 44 deletions

View File

@ -18,12 +18,12 @@
<!-- 所有子模块 -->
<modules>
<module>sa-token-dao-redis</module>
<module>sa-token-dao-redis-jackson</module>
<module>sa-token-dao-redis-fastjson</module>
<module>sa-token-dao-redis-fastjson2</module>
<module>sa-token-dao-redisson-jackson</module>
<module>sa-token-dao-redisx</module>
<module>sa-token-redis</module>
<module>sa-token-redis-jackson</module>
<module>sa-token-redis-fastjson</module>
<module>sa-token-redis-fastjson2</module>
<module>sa-token-redisson-jackson</module>
<module>sa-token-redisx</module>
<module>sa-token-alone-redis</module>
<module>sa-token-dialect-thymeleaf</module>
<module>sa-token-sso</module>
@ -32,9 +32,9 @@
<module>sa-token-spring-aop</module>
<module>sa-token-temp-jwt</module>
<module>sa-token-jwt</module>
<module>sa-token-context-dubbo</module>
<module>sa-token-context-dubbo3</module>
<module>sa-token-context-grpc</module>
<module>sa-token-dubbo</module>
<module>sa-token-dubbo3</module>
<module>sa-token-grpc</module>
</modules>
<dependencies>

View File

@ -20,22 +20,22 @@
<!-- Sa-Token Redis Dependency -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis</artifactId>
<artifactId>sa-token-redis</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis-jackson</artifactId>
<artifactId>sa-token-redis-jackson</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis-fastjson</artifactId>
<artifactId>sa-token-redis-fastjson</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-dao-redis-fastjson2</artifactId>
<artifactId>sa-token-redis-fastjson2</artifactId>
<optional>true</optional>
</dependency>
<!-- redis pool -->

View File

@ -25,10 +25,10 @@ import java.util.stream.Collectors;
* <p>
* 使用方式在引入 sa-token redis 集成相关包的前提下继续引入当前依赖 <br> <br>
* 注意事项目前本依赖仅对以下插件有 Redis 分离效果 <br>
* sa-token-dao-redis <br>
* sa-token-dao-redis-jackson <br>
* sa-token-dao-redis-fastjson <br>
* sa-token-dao-redis-fastjson2 <br>
* sa-token-redis <br>
* sa-token-redis-jackson <br>
* sa-token-redis-fastjson <br>
* sa-token-redis-fastjson2 <br>
* </p>
*
*
@ -172,7 +172,7 @@ public class SaAloneRedisInject implements EnvironmentAware{
// 3. 开始初始化 SaTokenDao 此处需要依次判断开发者引入的是哪个 redis
// 如果开发者引入的是sa-token-dao-redis
// 如果开发者引入的是sa-token-redis
try {
Class.forName("cn.dev33.satoken.dao.SaTokenDaoRedis");
SaTokenDaoRedis dao = (SaTokenDaoRedis)saTokenDao;
@ -181,7 +181,7 @@ public class SaAloneRedisInject implements EnvironmentAware{
return;
} catch (ClassNotFoundException e) {
}
// 如果开发者引入的是sa-token-dao-redis-jackson
// 如果开发者引入的是sa-token-redis-jackson
try {
Class.forName("cn.dev33.satoken.dao.SaTokenDaoRedisJackson");
SaTokenDaoRedisJackson dao = (SaTokenDaoRedisJackson)saTokenDao;
@ -190,7 +190,7 @@ public class SaAloneRedisInject implements EnvironmentAware{
return;
} catch (ClassNotFoundException e) {
}
// 如果开发者引入的是sa-token-dao-redis-fastjson
// 如果开发者引入的是sa-token-redis-fastjson
try {
Class.forName("cn.dev33.satoken.dao.SaTokenDaoRedisFastjson");
SaTokenDaoRedisFastjson dao = (SaTokenDaoRedisFastjson)saTokenDao;
@ -199,7 +199,7 @@ public class SaAloneRedisInject implements EnvironmentAware{
return;
} catch (ClassNotFoundException e) {
}
// 如果开发者引入的是sa-token-dao-redis-fastjson2
// 如果开发者引入的是sa-token-redis-fastjson2
try {
Class.forName("cn.dev33.satoken.dao.SaTokenDaoRedisFastjson2");
SaTokenDaoRedisFastjson2 dao = (SaTokenDaoRedisFastjson2)saTokenDao;

View File

@ -12,9 +12,9 @@
</parent>
<packaging>jar</packaging>
<name>sa-token-context-dubbo</name>
<artifactId>sa-token-context-dubbo</artifactId>
<description>sa-token-context-dubbo</description>
<name>sa-token-dubbo</name>
<artifactId>sa-token-dubbo</artifactId>
<description>sa-token-dubbo</description>
<dependencies>
<!-- sa-token-core -->

View File

@ -0,0 +1,12 @@
target/
node_modules/
bin/
.settings/
unpackage/
.classpath
.project
.factorypath
.idea/

View File

@ -10,9 +10,9 @@
<relativePath>../pom.xml</relativePath>
</parent>
<name>sa-token-context-dubbo3</name>
<artifactId>sa-token-context-dubbo3</artifactId>
<description>sa-token-context-dubbo3</description>
<name>sa-token-dubbo3</name>
<artifactId>sa-token-dubbo3</artifactId>
<description>sa-token-dubbo3</description>
<properties>

View File

@ -0,0 +1,12 @@
target/
node_modules/
bin/
.settings/
unpackage/
.classpath
.project
.factorypath
.idea/

View File

@ -13,7 +13,7 @@
<packaging>jar</packaging>
<artifactId>sa-token-context-grpc</artifactId>
<artifactId>sa-token-grpc</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>

View File

@ -10,7 +10,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>sa-token-dao-redis-fastjson</artifactId>
<artifactId>sa-token-redis-fastjson</artifactId>
<dependencies>
<!-- sa-token-spring-boot-starter -->

View File

@ -10,7 +10,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>sa-token-dao-redis-fastjson2</artifactId>
<artifactId>sa-token-redis-fastjson2</artifactId>
<dependencies>
<!-- sa-token-spring-boot-starter -->

View File

@ -12,8 +12,8 @@
</parent>
<packaging>jar</packaging>
<name>sa-token-dao-redis-jackson</name>
<artifactId>sa-token-dao-redis-jackson</artifactId>
<name>sa-token-redis-jackson</name>
<artifactId>sa-token-redis-jackson</artifactId>
<description>sa-token integrate redis (to jackson)</description>
<dependencies>

View File

@ -12,8 +12,8 @@
</parent>
<packaging>jar</packaging>
<name>sa-token-dao-redis</name>
<artifactId>sa-token-dao-redis</artifactId>
<name>sa-token-redis</name>
<artifactId>sa-token-redis</artifactId>
<description>sa-token integrate redis</description>
<dependencies>

View File

@ -12,8 +12,8 @@
</parent>
<packaging>jar</packaging>
<name>sa-token-dao-redisson-jackson</name>
<artifactId>sa-token-dao-redisson-jackson</artifactId>
<name>sa-token-redisson-jackson</name>
<artifactId>sa-token-redisson-jackson</artifactId>
<description>sa-token integrate redisson (to jackson)</description>
<dependencies>

View File

@ -1,12 +1,12 @@
sa-token-dao-redisx 是中立的扩展。可任何应用开发框架下使用springboot, solon, jfinal 等..
sa-token-redisx 是中立的扩展。可任何应用开发框架下使用springboot, solon, jfinal 等..
### 使用示例
#### 1.配置
```yaml
sa-token-dao: #名字可以随意取
sa-token: #名字可以随意取
redis:
server: "localhost:6379"
password: 123456
@ -22,7 +22,7 @@ sa-token-dao: #名字可以随意取
@Configuration
public class Config {
@Bean
public SaTokenDao saTokenDaoInit(@Inject("${sa-token-dao.redis}") SaTokenDaoOfRedis saTokenDao) {
public SaTokenDao saTokenDaoInit(@Inject("${sa-token.redis}") SaTokenDaoOfRedis saTokenDao) {
return saTokenDao;
}
}

View File

@ -12,8 +12,8 @@
</parent>
<packaging>jar</packaging>
<name>sa-token-dao-redisx</name>
<artifactId>sa-token-dao-redisx</artifactId>
<name>sa-token-redisx</name>
<artifactId>sa-token-redisx</artifactId>
<description>sa-token integrate redis</description>
<dependencies>

View File

@ -13,14 +13,14 @@ import org.noear.solon.annotation.Inject;
@Configuration
public class Config {
@Bean
public void saTokenDaoInit(@Inject("${sa-token-dao.redis}") SaTokenDaoOfRedis saTokenDao) {
public void saTokenDaoInit(@Inject("${sa-token.redis}") SaTokenDaoOfRedis saTokenDao) {
//手动操作可适用于任何框架
SaManager.setSaTokenDao(saTokenDao);
}
@Bean
public SaTokenDao saTokenDaoInit2(@Inject("${sa-token-dao.redis}") SaTokenDaoOfRedis saTokenDao) {
public SaTokenDao saTokenDaoInit2(@Inject("${sa-token.redis}") SaTokenDaoOfRedis saTokenDao) {
//Solon 项目可用此案
return saTokenDao;
}

View File

@ -2,7 +2,7 @@
sa-token-dao: #名字可以随意取
sa-token: #名字可以随意取
redis:
server: "localhost:6379"
password: 123456