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

Signed-off-by: 捏造的信仰 <yiding.he@gmail.com>
This commit is contained in:
捏造的信仰 2022-09-07 03:00:51 +00:00 committed by Gitee
parent 42d602b7a8
commit 036144b9ea
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -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());