SpringMvc 参数是对象,包含不提交基本类型的时候 400错误
来源:互联网 发布:热设计软件 编辑:程序博客网 时间:2024/05/01 08:21
Field error in object 'pojectInfo' on field 'staffCount': rejected value []; codes [typeMismatch.pojectInfo.staffCount,typeMismatch.staffCount,typeMismatch.int,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [pojectInfo.staffCount,staffCount]; arguments []; default message [staffCount]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'int' for property 'staffCount'; nested exception is java.lang.NumberFormatException: For input string: ""]
把基本类型改为 对象
如 int–》Integer
0 0
- SpringMvc 参数是对象,包含不提交基本类型的时候 400错误
- springMVC使用JQUERY提交数组接收时候报错,接收参数对象的属性为数组
- springMVC form表单提交---包含时间类型的数据
- springMVC form表单提交---包含时间类型的数据
- springMVC form表单提交---包含时间类型的数据
- springMVC form表单提交---包含时间类型的数据
- springMVC form表单提交---包含时间类型的数据
- SpringMVC对post提交的对象和对get提交的单个参数分别是如何校验的
- SpringMVC绑定基本类型参数的问题
- Springmvc提交日期类型参数
- springMVC form表单提交---包含时间类型的数据报错400
- 形式参数是引用类型的时候 返回值类型是引用类型的时候
- Springmvc保存时间的时候报转换类型错误解决方法
- SpringMVC解析包含多个对象的List参数
- 编写一个静态类MyExtensions,扩展.NET Framework基本类型的功能发现错误 2 “int”不包含“DisplayDefiningAssemb
- 方法参数是基本类型和引用类型的区别
- SpringMVC参数校验,包括JavaBean和基本类型的校验
- 读取参数类型是一个对象的参数值
- iOS 定位相关问题
- 最近遇到两道简单算法题总结一下
- jsoncpp简介
- 一个给力的各种语言的框架的整理(来自于github的一个NB项目)
- php 代码功能性技巧
- SpringMvc 参数是对象,包含不提交基本类型的时候 400错误
- Hadoop/Spark相关面试问题总结
- 磁盘缓存的使用DiskLruCache类
- ES5 中的面向对象编程前传 之 深刻理解原型链(prototype)
- flume高并发优化——(11)排除json转换及中文乱码
- Your build settings specify a provisioning profile with the UUID‘XXX’
- JAVA深入研究——Method的Invoke方法。
- 【ExpandableListView】---2 长按和点击处理
- 86. Partition List