123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //package com.fdkankan.contro.Interceptor;
- //
- //import com.alibaba.fastjson.JSON;
- //import lombok.extern.slf4j.Slf4j;
- //import org.aspectj.lang.JoinPoint;
- //import org.aspectj.lang.annotation.AfterReturning;
- //import org.aspectj.lang.annotation.AfterThrowing;
- //import org.aspectj.lang.annotation.Aspect;
- //import org.springframework.stereotype.Component;
- //import org.springframework.web.multipart.MultipartFile;
- //
- //import java.util.Arrays;
- //import java.util.List;
- //
- //@Slf4j
- //@Aspect
- //@Component
- //public class LogProxy {
- //
- // @AfterReturning(value = "execution(* com.fdkankan.contro.controller.*.*(..))", returning = "result")
- // public void afterMethod(JoinPoint point, Object result){
- // String methodName = point.getSignature().getName();
- // List<Object> args = (List<Object>) Arrays.asList(point.getArgs()).stream().filter(v -> {
- // if(v instanceof MultipartFile){
- // return false;
- // }
- // if(v instanceof String && ((String) v).startsWith("data:image/png;base64")){
- // return false;
- // }
- // return true;
- // });
- // System.out.println("连接点方法为:" + methodName + ",参数为:" + JSON.toJSONString(args) + ",目标方法执行结果为:" + JSON.toJSONString(result));
- // }
- //
- // @AfterThrowing(value = "execution(* com.fdkankan.kz.pms.controller.*.*.*(..))")
- // public void afterThrowing(JoinPoint point){
- // String methodName = point.getSignature().getName();
- // List<Object> args = (List<Object>) Arrays.asList(point.getArgs()).stream().filter(v -> {
- // if(v instanceof MultipartFile){
- // return false;
- // }
- // if(v instanceof String && ((String) v).startsWith("data:image/png;base64")){
- // return false;
- // }
- // return true;
- // });
- // System.out.println("连接点方法为:" + methodName + ",参数为:" + JSON.toJSONString(args));
- // }
- //
- //
- //}
|