|
|
@@ -19,6 +19,8 @@ import org.springframework.stereotype.Component;
|
|
19
|
19
|
import org.springframework.validation.BindingResult;
|
|
20
|
20
|
import org.springframework.web.multipart.MultipartFile;
|
|
21
|
21
|
import com.alibaba.fastjson2.JSON;
|
|
|
22
|
+import com.ruoyi.common.core.text.Convert;
|
|
|
23
|
+import com.ruoyi.common.core.utils.ExceptionUtil;
|
|
22
|
24
|
import com.ruoyi.common.core.utils.ServletUtils;
|
|
23
|
25
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
24
|
26
|
import com.ruoyi.common.core.utils.ip.IpUtils;
|
|
|
@@ -53,7 +55,7 @@ public class LogAspect
|
|
53
|
55
|
* 处理请求前执行
|
|
54
|
56
|
*/
|
|
55
|
57
|
@Before(value = "@annotation(controllerLog)")
|
|
56
|
|
- public void boBefore(JoinPoint joinPoint, Log controllerLog)
|
|
|
58
|
+ public void doBefore(JoinPoint joinPoint, Log controllerLog)
|
|
57
|
59
|
{
|
|
58
|
60
|
TIME_THREADLOCAL.set(System.currentTimeMillis());
|
|
59
|
61
|
}
|
|
|
@@ -101,7 +103,7 @@ public class LogAspect
|
|
101
|
103
|
if (e != null)
|
|
102
|
104
|
{
|
|
103
|
105
|
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
|
104
|
|
- operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000));
|
|
|
106
|
+ operLog.setErrorMsg(StringUtils.substring(Convert.toStr(e.getMessage(), ExceptionUtil.getExceptionMessage(e)), 0, 2000));
|
|
105
|
107
|
}
|
|
106
|
108
|
// 设置方法名称
|
|
107
|
109
|
String className = joinPoint.getTarget().getClass().getName();
|