插入 SysOperLog 时,限制 operUrl 属性的长度

Signed-off-by: 捏造的信仰 <yiding.he@gmail.com>
master
捏造的信仰 2 years ago committed by Gitee
parent 42d602b7a8
commit 036144b9ea
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
  1. 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

@ -78,7 +78,7 @@ public class LogAspect
// 请求的地址
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
operLog.setOperIp(ip);
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));
if (loginUser != null)
{
operLog.setOperName(loginUser.getUsername());

Loading…
Cancel
Save