refactor: 增强代码注释以提升可读性和维护性
This commit is contained in:
+6
@@ -39,6 +39,12 @@ public class RepeatSubmitAspect {
|
||||
|
||||
private static final ThreadLocal<String> KEY_CACHE = new ThreadLocal<>();
|
||||
|
||||
/**
|
||||
* 请求进入前校验是否重复提交。
|
||||
*
|
||||
* @param point 切点
|
||||
* @param repeatSubmit 防重复提交注解
|
||||
*/
|
||||
@Before("@annotation(repeatSubmit)")
|
||||
public void doBefore(JoinPoint point, RepeatSubmit repeatSubmit) throws Throwable {
|
||||
// 如果注解不为0 则使用注解数值
|
||||
|
||||
+5
@@ -40,6 +40,11 @@ public class RedisConfig {
|
||||
@Autowired
|
||||
private RedissonProperties redissonProperties;
|
||||
|
||||
/**
|
||||
* 自定义 Redisson 序列化、线程与连接模式配置。
|
||||
*
|
||||
* @return Redisson 自动配置定制器
|
||||
*/
|
||||
@Bean
|
||||
public RedissonAutoConfigurationCustomizer redissonCustomizer() {
|
||||
return config -> {
|
||||
|
||||
+6
@@ -40,6 +40,9 @@ public class RedissonProperties {
|
||||
*/
|
||||
private ClusterServersConfig clusterServersConfig;
|
||||
|
||||
/**
|
||||
* Redisson 单机服务配置。
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class SingleServerConfig {
|
||||
@@ -76,6 +79,9 @@ public class RedissonProperties {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Redisson 集群服务配置。
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public static class ClusterServersConfig {
|
||||
|
||||
Reference in New Issue
Block a user