Fork me on GitHub

【毕业设计】HTTP Status 400 -type Status report message description The request sent by the client was syntactically incorrect.

  

HTTP Status 400 -

  今天晚上做毕设时想测试一下各个函数是否成功实现了,如何就在浏览器中输入action里的路径,结果发现插入一条商品的信息时,点击“提交”以后出现400,一下我就慌了,然后开始检查自己的代码和网上的是否一致,结果发现一些错误,但是改过来以后还是400,结果看控制台的信息才知道是某个输入框里要输的是int型  结果我输入的是英文,亏我还改了那么多次代码,就这个小错误花了我半个多小时!可恶~

 

控制台信息如下:

  

警告: Handler execution resulted in exception: org.springframework.validation.BeanPropertyBindingResult: 1 errors
Field error in object 'msproductinfo' on field 'merchantid': rejected value [ sd]; codes [typeMismatch.msproductinfo.merchantid,typeMismatch.merchantid,typeMismatch.int,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [msproductinfo.merchantid,merchantid]; arguments []; default message [merchantid]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'merchantid'; nested exception is java.lang.NumberFormatException: For input string: "sd"]

posted @ 2019-04-26 21:50  花还是一样开  阅读(973)  评论(0编辑  收藏  举报