错误日志:

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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. Optional int parameter 'id' is present but cannot be translated into a null value due to being decla

    这个错误可以将参数由int改为Integer

  4. 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值. 难 ...

  5. 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 ...

  6. Tomcat上java.lang.IllegalStateException: Optional int parameter 'id' is not present

    今日, 本人在tomcat+spring mvc平台的服务器上遇到java.lang.IllegalStateException: Optional int parameter 'id' is not ...

  7. 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 ...

  8. Required String parameter ' ' is not present

    Required String parameter ' ' is not present 报错原因: url中的参数错误. 解决方法: 1.修正url中的参数的值. 2.在Controller层中的@ ...

  9. 使用springmvc报错Required int parameter 'age' is not present

    仔细检查jsp代码 <a href="springmvc/testRequestParam?username=atguigu$age=11">Test RequestP ...

随机推荐

  1. robotframework-SikuliLibrary 第三方库

    Sikuli给GUI的自动化测试提供了一种新的方式,使用截图和图片,而不是用API.这种方法跟人工键盘鼠标的输入的测试更接近.Sikuli包括sikul脚本,基于Jython的API以及sikuli ...

  2. Vue学习之品牌案例部分代码小结(二)

    品牌案例的增删查和其他部分效果: <!DOCTYPE html> <html lang="en"> <head> <meta charse ...

  3. JavaScript 书写位置

    类似于 CSS 样式,JavaScript 也有三种不同位置的书写方式. 1.写在行内 <input type="button" value="按钮" o ...

  4. 单词demantoite翠榴石demantoite英语

    一般认为翠榴石demantoite的形成条件是: (1)围岩组成应该是贫铝富铁,且附近有钙质碳酸盐出露地区,即有利于“纯度高”的钙铁榴石结晶环境.否则,若钙铝榴石端员分子比增多,2价Fe必将直接影响晶 ...

  5. android.view.ViewRoot$CalledFromWrongThreadException 异常的解决方案

    https://blog.csdn.net/vincent_czz/article/details/7070354 https://stackoverflow.com/questions/210141 ...

  6. .NET异步资料收集

    个人认为应该是.NET关于并行编程 / 异步编程最权威的内容来源(虽然看起来里面的内容离现在已经好几年了,但是大部分内容都不过时) https://devblogs.microsoft.com/pfx ...

  7. openssl生成证书及签名

    第一步,生成私钥 $ openssl genrsa -out privatekey.pem 2048 查看生成的私钥内容 $ file privatekey.pem privatekey.pem: P ...

  8. scala快速入门之文档注释

    scala快速入门之文档注释 1.在项目栏的目录树中找到该源码,右击点击Show in Explorer, 即可找到该源码的本地路径,在路径中输入cmd 2.执行scaladoc -d  生成文档注释 ...

  9. docker安装常见应用

    1.emqx #!/bin/bash docker stop emqttd-docker-v2.3.11 docker rm emqttd-docker-v2.3.11 docker run -tid ...

  10. SAMBA配置文件详解

    全局参数: ==================Global Settings =================== [global] config file = /usr/local/samba/ ...