mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 08:57:17 +08:00
chore: 优化部分代码格式和注释
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<description>ContiNew Starter 限流模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- Web 模块 -->
|
||||
<!-- Web 模块 - 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-starter-web-core</artifactId>
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user