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 ...
随机推荐
- 前端1-----HTML了解,内联标签(图片,超链接锚点,超链接邮箱)
前端1-----HTML了解,内联标签(图片,超链接锚点,超链接邮箱) 一丶自定制B/S # -*-coding:utf-8-*- # Author:Ds import socket IP_PORT= ...
- vue中对象数组去重
其实很简单,一般的数组去重可以直接用 new Set() 方法即可,但是数组对象的话,比较复杂,不能直接用,我们可以采取间接的方法来去重 unique(arr) { const res = new M ...
- 【转载】C#中SqlConnection类的作用以及常用方法
在C#的数据库编程中,SqlConnection类主要用于连接Sqlserver数据库,使用SqlConnection类的实例方法我们可以打开Sqlserver数据库连接以及获取数据完毕后关闭数据库连 ...
- 文件转base64处理或转换blob对象链接
一.文件转base64,代码: axios({ method: 'get', url: apiPath.common.downloaddUrl, responseType: 'blob'}).then ...
- Java学习之:Spring的扩展配置
1.在配置文件applicationContext.xml中,引入相关的配置文件方式: 2.使用Jndi数据源的方式改造配置文件applicationContext.xml: 3.注释配置文件appl ...
- FreeRTOS 任务通知模拟消息邮箱
举例 void task1_task(void *pvParameters) { u8 key; BaseType_t err; while(1) { key=KEY_Scan(0); //扫描按键 ...
- tail: inotify cannot be used, reverting to polling: Too many open files
tail -f catalina.out 出现警告: tail: inotify cannot be used, reverting to polling: Too many open files l ...
- prometheus学习系列二: Prometheus安装
下载 在prometheus的官网的download页面,可以找到prometheus的下载二进制包. [root@node00 src]# cd /usr/src/ [root@node00 src ...
- 【TCP】TCP三次握手与四次挥手
一.TCP三次握手 第一次握手:Client 将标志位 SYN=1 ,随机产生一个值 seq=J ,并将该数据包发送给 Server .此时,Client 进入SYN_SENT 状态,等待 Serve ...
- LVSDR模型与持久连接
LVS之DR模型以及持久连接 LVS的简单介绍 linux virtual server 简单来讲lvs是一段内核代码 类似于netfilter本身是一框架但不提供任何功能,但是在这框架上提供了能够根 ...