Optional int parameter 'resourceState' is present but cannot be translated into a null value
错误日志:
java.lang.IllegalStateException: Optional int parameter 'resourceState' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type.
原因:
controller层接收数字型参数resourceState时用的int接收,但是参数为空null,所以报错,将int改为Integer即可
Optional int parameter 'resourceState' is present but cannot be translated into a null value的更多相关文章
- Optional int parameter 'time' is present but cannot be translated into a null value due to being decla
今天在操作redis的时候报了这个错:Optional int parameter 'time' is present but cannot be translated into a null val ...
- Optional int parameter 'pId' is present but cannot be translated into a null value due to being declared as a primitive type.
接口测试的时候遇到了一个问题,导致测试阻断了好久,在此记录,谨防忘记. 具体报错如下: Optional int parameter 'pId' is present but cannot be tr ...
- Optional int parameter 'id' is present but cannot be translated into a null value due to being decla
这个错误可以将参数由int改为Integer
- Optional int parameter 'fundID' is present but cannot be translated into a null value due to being declared as a primitive type
错误的意思是: "可选的int参数'fundID'存在但由于被声明为基本类型而无法转换为空值" 意思是fundID被申明为int的基本数据类型, 不能转换为字符串的null值. 难 ...
- is present but cannot be translated into a null value due to being declared as a primitive type
解决办法:把基本类型改为对象,譬如此处将pageId的类型由int 改为Integer 2016-10-19 19:36:11.275 DEBUG [http-nio-9999-exec-2][org ...
- Tomcat上java.lang.IllegalStateException: Optional int parameter 'id' is not present
今日, 本人在tomcat+spring mvc平台的服务器上遇到java.lang.IllegalStateException: Optional int parameter 'id' is not ...
- Optional int parameter 'rows' is not present but cannot be translated into a null value due to being declared as a primitive type.
我的spring mvc 代码: @Controller @RequestMapping("/product") public class Fancy { @RequestMapp ...
- Required String parameter ' ' is not present
Required String parameter ' ' is not present 报错原因: url中的参数错误. 解决方法: 1.修正url中的参数的值. 2.在Controller层中的@ ...
- 使用springmvc报错Required int parameter 'age' is not present
仔细检查jsp代码 <a href="springmvc/testRequestParam?username=atguigu$age=11">Test RequestP ...
随机推荐
- idea2018破解
准备:ideaIU-2018.1.4.exe 安装程序 JetbrainsCrack-2.10-release-enc.jar 破解jar包 第一步:打开安装目录/bin,找到idea.exe.vmo ...
- MySQL安装和使用
1.MySQL安装: 1).到MySQL官网https://dev.mysql.com/downloads/installer/,下载MySQL 5.7版本:(注:现在官网上最新版本已经变成8.0.1 ...
- echarts设置横坐标的信息竖向排放
需要在xAxis 中添加 axisLabel , demo案例如下: 设置成每行两个文字竖向排放. xAxis : [ { type : 'category', data : this.xAxis, ...
- Mac 编译报错 symbol(s) not found for
查看静态库文件支持的arm64指令集架构的方法 root# lipo -info libname.a Architectures in the fat file: libname.a are: arm ...
- RabbitMQ基本概念(四)-服务详细配置与日常监控管理
RabbitMQ服务管理 启动服务:rabbitmq-server -detached[ /usr/local/rabbitmq/sbin/rabbitmq-server -detached ] 查看 ...
- JQuery-zTree.js使用范例
JQuery-zTree.js使用范例 实现Tree树的插件很多,比如常见的UI:Layui.ElementUI.iView ... .这里我们介绍一个小巧的构建Tree树的插件 zTree.js z ...
- 蓝桥杯如何训练?(附VIP题库)
https://www.dotcpp.com/ 给大家介绍下蓝桥杯,是近几年可以说国内名气最大的程序设计类比赛了 相比国际赛事ACM,蓝桥杯入门简单.中文答题.拿奖率高,更适合国内大众化参加,近几年不 ...
- kafaka可视化工具kafkatool
炒作就像动物世界的森林法则,专门攻击弱者,这种做法往往能够百发百中. ...
- C++学习(9)—— 对象的初始化及清理
1. 构造函数和析构函数 对象的初始化和清理是两个非常重要的安全问题 一个对象或者变量没有初始状态,对其使用后果是未知 同样的使用完一个对象或者变量,没有及时清理,也会造成一些安全问题 C ...
- 类型转换的时候,.valueOf()和.parseX(),.Xvalue()的区别
.valueOf()返回的是包装类(Wrapper Class)中的一些类型:而.parseX()返回的是基本数据类型,如int,char,double等.其参数应该是String类型. .Xvalu ...