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

2.X
疯狂的狮子li 2 years ago
parent ca18a1f767
commit c2e7060697

@ -73,7 +73,7 @@ public class LogAspect {
operLog.setStatus(BusinessStatus.SUCCESS.ordinal()); operLog.setStatus(BusinessStatus.SUCCESS.ordinal());
// 请求的地址 // 请求的地址
operLog.setOperIp(ServletUtils.getClientIP()); operLog.setOperIp(ServletUtils.getClientIP());
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI()); operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));
String username = LoginHelper.getUsername(); String username = LoginHelper.getUsername();
if (StringUtils.isNotBlank(username)) { if (StringUtils.isNotBlank(username)) {
operLog.setOperName(username); operLog.setOperName(username);

Loading…
Cancel
Save