码迷,mamicode.com
首页 > 其他好文 > 详细

表单提交验证报错

时间:2016-05-23 18:38:25      阅读:291      评论:0      收藏:0      [点我收藏+]

标签:

[org.jeecgframework.core.common.exception.GlobalExceptionResolver]全局处理异常捕获:
org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object ‘goodsEntity‘ on field ‘id‘: rejected value [,]; codes [typeMismatch.goodsEntity.id,typeMismatch.id,typeMismatch.java.lang.Integer,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [goodsEntity.id,id]; arguments []; default message [id]]; default message [Failed to convert property value of type ‘java.lang.String[]‘ to required type ‘java.lang.Integer‘ for property ‘id‘; nested exception is java.lang.NumberFormatException: For input string: ","]

错误原因是有两个name为id的属性,默认为数组。

解决方法,删除一个属性即可。

 

表单提交验证报错

标签:

原文地址:http://www.cnblogs.com/taz372436/p/5520900.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!