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