瀏覽代碼

过滤BindingResult对象,防止异常

RuoYi 4 年之前
父節點
當前提交
b6f13c546b
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

+ 3 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

@@ -16,6 +16,7 @@ import org.aspectj.lang.reflect.MethodSignature;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
+import org.springframework.validation.BindingResult;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.servlet.HandlerMapping;
 import com.alibaba.fastjson.JSON;
@@ -237,6 +238,7 @@ public class LogAspect
                 return entry.getValue() instanceof MultipartFile;
             }
         }
-        return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse;
+        return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse
+                || o instanceof BindingResult;
     }
 }