mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-08 16:57:09 +08:00
chore: 统一部分命名风格
This commit is contained in:
@@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import top.continew.starter.auth.justauth.core.JustAuthStateCacheRedisImpl;
|
||||
import top.continew.starter.auth.justauth.core.AuthStateCacheRedisDefaultImpl;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
|
||||
/**
|
||||
@@ -41,13 +41,13 @@ public class JustAuthAutoConfiguration {
|
||||
private static final Logger log = LoggerFactory.getLogger(JustAuthAutoConfiguration.class);
|
||||
|
||||
/**
|
||||
* 自定义 State 缓存实现
|
||||
* State 缓存 Redis 实现(默认)
|
||||
*/
|
||||
@Bean
|
||||
@ConditionalOnClass(RedisClient.class)
|
||||
@ConditionalOnProperty(prefix = "justauth.cache", name = "type", havingValue = "redis")
|
||||
public AuthStateCache authStateCache() {
|
||||
JustAuthStateCacheRedisImpl impl = new JustAuthStateCacheRedisImpl();
|
||||
AuthStateCacheRedisDefaultImpl impl = new AuthStateCacheRedisDefaultImpl();
|
||||
log.debug("[ContiNew Starter] - Auto Configuration 'JustAuth-AuthStateCache-Redis' completed initialization.");
|
||||
return impl;
|
||||
}
|
||||
|
@@ -22,12 +22,12 @@ import top.continew.starter.cache.redisson.util.RedisUtils;
|
||||
import java.time.Duration;
|
||||
|
||||
/**
|
||||
* JustAuth State 缓存 Redis 实现
|
||||
* 默认 State 缓存 Redis 实现
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class JustAuthStateCacheRedisImpl implements AuthStateCache {
|
||||
public class AuthStateCacheRedisDefaultImpl implements AuthStateCache {
|
||||
|
||||
private static final String KEY_PREFIX = "SOCIAL_AUTH_STATE";
|
||||
|
@@ -60,7 +60,7 @@ public class SaTokenDaoConfiguration {
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义持久层实现-Redis
|
||||
* 自定义持久层实现-Redis(默认)
|
||||
*/
|
||||
@ConditionalOnMissingBean(SaTokenDao.class)
|
||||
@ConditionalOnClass(RedisClient.class)
|
||||
@@ -73,7 +73,7 @@ public class SaTokenDaoConfiguration {
|
||||
|
||||
@Bean
|
||||
public SaTokenDao saTokenDao() {
|
||||
return new SaTokenDaoRedisImpl();
|
||||
return new SaTokenDaoRedisDefaultImpl();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,12 +26,12 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Sa-Token 持久层 Redis 实现(参考:Sa-Token/sa-token-plugin/sa-token-dao-redisx/SaTokenDaoOfRedis.java)
|
||||
* 默认 Sa-Token 持久层 Redis 实现(参考:Sa-Token/sa-token-plugin/sa-token-dao-redisx/SaTokenDaoOfRedis.java)
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class SaTokenDaoRedisImpl implements SaTokenDao {
|
||||
public class SaTokenDaoRedisDefaultImpl implements SaTokenDao {
|
||||
|
||||
@Override
|
||||
public String get(String key) {
|
@@ -13,16 +13,10 @@
|
||||
<description>ContiNew Starter 扩展模块 - 多租户 - MyBatis Plus ORM 模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-extension-tenant-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MyBatis Plus(MyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,简化开发、提高效率) -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
<artifactId>mybatis-plus-extension</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Dynamic Datasource(基于 Spring Boot 的快速集成多数据源的启动器) -->
|
||||
@@ -31,5 +25,11 @@
|
||||
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-extension-tenant-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@@ -26,7 +26,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import top.continew.starter.core.constant.PropertiesConstants;
|
||||
import top.continew.starter.extension.tenant.handler.TenantLineHandlerImpl;
|
||||
import top.continew.starter.extension.tenant.handler.DefaultTenantLineHandler;
|
||||
|
||||
/**
|
||||
* 多租户自动配置
|
||||
@@ -64,12 +64,12 @@ public class TenantAutoConfiguration {
|
||||
}
|
||||
|
||||
/**
|
||||
* 租户行级隔离处理器
|
||||
* 租户行级隔离处理器(默认)
|
||||
*/
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public TenantLineHandler tenantLineHandler(TenantProperties properties) {
|
||||
return new TenantLineHandlerImpl(properties);
|
||||
return new DefaultTenantLineHandler(properties);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -8,16 +8,16 @@ import top.continew.starter.extension.tenant.autoconfigure.TenantProperties;
|
||||
import top.continew.starter.extension.tenant.context.TenantContextHolder;
|
||||
|
||||
/**
|
||||
* 租户行级隔离处理器
|
||||
* 默认租户行级隔离处理器
|
||||
*
|
||||
* @author Charles7c
|
||||
* @since 2.7.0
|
||||
*/
|
||||
public class TenantLineHandlerImpl implements TenantLineHandler {
|
||||
public class DefaultTenantLineHandler implements TenantLineHandler {
|
||||
|
||||
private final TenantProperties tenantProperties;
|
||||
|
||||
public TenantLineHandlerImpl(TenantProperties tenantProperties) {
|
||||
public DefaultTenantLineHandler(TenantProperties tenantProperties) {
|
||||
this.tenantProperties = tenantProperties;
|
||||
}
|
||||
|
Reference in New Issue
Block a user