|
|
@@ -59,19 +59,18 @@ public class LogAspect {
|
|
|
public Object around(ProceedingJoinPoint point) {
|
|
|
MethodSignature signature = (MethodSignature) point.getSignature();
|
|
|
Method method = signature.getMethod();
|
|
|
- // 请求的类名
|
|
|
- String className = point.getTarget().getClass().getName();
|
|
|
- // 请求的方法名
|
|
|
- String methodName = signature.getName();
|
|
|
// 请求的方法参数值
|
|
|
String args = Arrays.toString(point.getArgs());
|
|
|
//从session中获取当前登陆人id
|
|
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
- log.info("className = {}", className);
|
|
|
log.info("method = {}", method);
|
|
|
- log.info("methodName = {}", methodName);
|
|
|
log.info("args = {}", args);
|
|
|
log.info("user.getUserName = {}", user.getUserName());
|
|
|
+ try {
|
|
|
+ return point.proceed();
|
|
|
+ } catch (Throwable e) {
|
|
|
+ log.error("日志记录失败 {}", e.getMessage());
|
|
|
+ }
|
|
|
return null;
|
|
|
}
|
|
|
|