Commit a7a98d153c2d9ea503c3ecded21128d407f34a6b
1 parent
41c6aa91
v3.5.0 过滤BindingResult对象,防止异常
Showing
1 changed file
with
6 additions
and
4 deletions
yudao-framework/yudao-spring-boot-starter-biz-operatelog/src/main/java/cn/iocoder/yudao/framework/operatelog/core/aop/OperateLogAspect.java
| ... | ... | @@ -6,13 +6,13 @@ import cn.hutool.core.util.StrUtil; |
| 6 | 6 | import cn.hutool.extra.servlet.ServletUtil; |
| 7 | 7 | import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; |
| 8 | 8 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 9 | +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 10 | +import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; | |
| 11 | +import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 9 | 12 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 10 | 13 | import cn.iocoder.yudao.framework.operatelog.core.dto.OperateLogCreateReqDTO; |
| 11 | 14 | import cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum; |
| 12 | 15 | import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService; |
| 13 | -import cn.iocoder.yudao.framework.common.util.monitor.TracerUtils; | |
| 14 | -import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 15 | -import cn.iocoder.yudao.framework.common.util.servlet.ServletUtils; | |
| 16 | 16 | import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; |
| 17 | 17 | import com.google.common.collect.Maps; |
| 18 | 18 | import io.swagger.annotations.Api; |
| ... | ... | @@ -23,6 +23,7 @@ import org.aspectj.lang.annotation.Around; |
| 23 | 23 | import org.aspectj.lang.annotation.Aspect; |
| 24 | 24 | import org.aspectj.lang.reflect.MethodSignature; |
| 25 | 25 | import org.springframework.core.annotation.AnnotationUtils; |
| 26 | +import org.springframework.validation.BindingResult; | |
| 26 | 27 | import org.springframework.web.bind.annotation.RequestMapping; |
| 27 | 28 | import org.springframework.web.bind.annotation.RequestMethod; |
| 28 | 29 | import org.springframework.web.multipart.MultipartFile; |
| ... | ... | @@ -356,7 +357,8 @@ public class OperateLogAspect { |
| 356 | 357 | // obj |
| 357 | 358 | return object instanceof MultipartFile |
| 358 | 359 | || object instanceof HttpServletRequest |
| 359 | - || object instanceof HttpServletResponse; | |
| 360 | + || object instanceof HttpServletResponse | |
| 361 | + || object instanceof BindingResult; | |
| 360 | 362 | } |
| 361 | 363 | |
| 362 | 364 | } | ... | ... |