欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResu

程序员文章站 2022-07-03 19:59:47
org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 0 errors2020/7/29 上午10:23:23at com.xxx.member.web.config.mvc.CustomBodyResolver.resolveArgument(CustomBodyResolver.java:72)2020/7/29 上午10:23:2......

 

org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 0 errors

2020/7/29 上午10:23:23 at com.xxx.member.web.config.mvc.CustomBodyResolver.resolveArgument(CustomBodyResolver.java:72)

2020/7/29 上午10:23:23 at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)

2020/7/29 上午10:23:23 at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:167)

2020/7/29 上午10:23:23 at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:134)

2020/7/29 上午10:23:23 at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)

2020/7/29 上午10:23:23 at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)

2020/7/29 上午10:23:23 at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)

问题引起原因主要是使用参数校验方式不对。比如Long类型入参使用   @NotEmpty注解等引起

<dependency>
  <groupId>org.hibernate</groupId>
  <artifactId>hibernate-validator</artifactId>
  <version>4.0.2.GA</version>
</dependency>

本文地址:https://blog.csdn.net/u014594604/article/details/107657531

相关标签: Java