refactor: 增强代码注释以提升可读性和维护性

This commit is contained in:
AprilWind
2026-05-18 10:10:16 +08:00
parent 84afd6e6c0
commit a2300b3a29
22 changed files with 192 additions and 1 deletions
@@ -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 则使用注解数值
@@ -40,6 +40,11 @@ public class RedisConfig {
@Autowired
private RedissonProperties redissonProperties;
/**
* 自定义 Redisson 序列化、线程与连接模式配置。
*
* @return Redisson 自动配置定制器
*/
@Bean
public RedissonAutoConfigurationCustomizer redissonCustomizer() {
return config -> {
@@ -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 {