chore: 优化部分代码格式和注释

This commit is contained in:
2025-05-21 22:18:10 +08:00
parent d5a74b42e8
commit 2fdd5b6fd3
11 changed files with 33 additions and 54 deletions

View File

@@ -11,7 +11,7 @@
<description>ContiNew Starter 限流模块</description>
<dependencies>
<!-- Web 模块 -->
<!-- Web 模块 - 核心模块 -->
<dependency>
<groupId>top.continew</groupId>
<artifactId>continew-starter-web-core</artifactId>

View File

@@ -18,7 +18,6 @@ package top.continew.starter.ratelimiter.aop;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.text.CharSequenceUtil;
import cn.hutool.core.util.ObjectUtil;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
@@ -162,7 +161,7 @@ public class RateLimiterAspect {
String key = rateLimiter.key();
if (CharSequenceUtil.isNotBlank(key)) {
Object eval = ExpressionUtils.eval(key, target, method, args);
if (ObjectUtil.isNull(eval)) {
if (eval == null) {
throw new RateLimiterException("限流 Key 解析错误");
}
key = Convert.toStr(eval);