mirror of https://github.com/elunez/eladmin
调用replaceAll() 方法修改为调用 replace() 方法
传给 replaceAll 的参数不是正则表达式, replaceAll 和 replace 效果是一样的, 且 replaceAll 由于会调用 ava.util.regex.Pattern.compile()方法, 导致性能消耗更大pull/705/head
parent
77a77933f1
commit
ced71dafb6
|
@ -68,7 +68,7 @@ public class LimitAspect {
|
|||
}
|
||||
}
|
||||
|
||||
ImmutableList<Object> keys = ImmutableList.of(StringUtils.join(limit.prefix(), "_", key, "_", request.getRequestURI().replaceAll("/","_")));
|
||||
ImmutableList<Object> keys = ImmutableList.of(StringUtils.join(limit.prefix(), "_", key, "_", request.getRequestURI().replace("/","_")));
|
||||
|
||||
String luaScript = buildLuaScript();
|
||||
RedisScript<Number> redisScript = new DefaultRedisScript<>(luaScript, Number.class);
|
||||
|
|
Loading…
Reference in New Issue