|
|
@@ -12,6 +12,7 @@ import org.aspectj.lang.annotation.Around;
|
|
|
import org.aspectj.lang.annotation.Aspect;
|
|
|
import org.aspectj.lang.annotation.Pointcut;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
@@ -34,7 +35,7 @@ public class LogAspect {
|
|
|
public void loggerPointcut(Log l) {
|
|
|
}
|
|
|
|
|
|
- @Around("loggerPointcut(l)")
|
|
|
+ @Around(value = "loggerPointcut(l)", argNames = "p,l")
|
|
|
public Object around(ProceedingJoinPoint p, Log l) throws Throwable {
|
|
|
Object result = null;
|
|
|
//开始时间
|
|
|
@@ -44,7 +45,7 @@ public class LogAspect {
|
|
|
Object[] args = p.getArgs();
|
|
|
Stream<?> stream = ArrayUtils.isEmpty(args) ? Stream.empty() : Arrays.stream(args);
|
|
|
List<Object> logArgs = stream
|
|
|
- .filter(arg -> (!(arg instanceof HttpServletRequest) && !(arg instanceof HttpServletResponse)))
|
|
|
+ .filter(arg -> (!(arg instanceof HttpServletRequest) && !(arg instanceof HttpServletResponse)) && !(arg instanceof MultipartFile))
|
|
|
.collect(Collectors.toList());
|
|
|
//过滤后序列化无异常
|
|
|
String param = JSON.toJSONString(logArgs);
|