|
@@ -12,9 +12,12 @@ import org.aspectj.lang.reflect.MethodSignature;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.validation.BeanPropertyBindingResult;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.Objects;
|
|
|
|
|
|
/**
|
|
@@ -58,19 +61,11 @@ public class ApiControllerAspect {
|
|
|
log.info("============class name=============:{}", className);
|
|
|
log.info("============invoke method===========:{}", methodName);
|
|
|
if (Objects.nonNull(args) && args.length > 0) {
|
|
|
- boolean jsonOut = true;
|
|
|
- for (Object o : args) {
|
|
|
- if (o instanceof CommonsMultipartFile) {
|
|
|
- jsonOut = false;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if (jsonOut) {
|
|
|
- log.info("============parameter key:{},value:{}===========", JacksonUtil.parseJson(paramsName),
|
|
|
- JacksonUtil.parseJson(args));
|
|
|
- } else {
|
|
|
- for (int i = 0; i < args.length; i++) {
|
|
|
- log.info("============parameter key:{},value:{}===========", paramsName[i], args[i]);
|
|
|
+ for (int i = 0; i < args.length; i++) {
|
|
|
+ if (Objects.nonNull(args[i]) && (args[i] instanceof HttpServletRequest || args[i] instanceof HttpServletResponse || args[i] instanceof CommonsMultipartFile || args[i] instanceof MultipartFile || args[i] instanceof BeanPropertyBindingResult)) {
|
|
|
+ continue;
|
|
|
+ } else {
|
|
|
+ log.info("============参数key:{},参数value===========:{}", JacksonUtil.parseJson(paramsName[i]), JacksonUtil.parseJson(args[i]));
|
|
|
}
|
|
|
}
|
|
|
}
|