错误日志:

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. JDK 监控和故障处理工具

    JDK 监控和故障处理工具 JDK 命令行工具 这些命令在 JDK 安装目录下的 bin 目录下: jps (JVM Process Status): 类似 UNIX 的 ps 命令.用户查看所有 J ...

  2. 巧记 In/hasOwnProperty/for…in/for…of/forEach区别

    写在前面 上面提到的这些东西,反复的记忆,反复的忘记.现分享一种巧记方法,有需要,请参考,希望你也过目不忘. 仅提供巧记思路.仅提供巧记思路.仅提供巧记思路. 1. in 用于判断属性是否在对象上(包 ...

  3. 安卓样式Style和主题Theme

    1. 区别 不过style是针对view来说的,比如TextView和EditText这些:而Theme必须针对整个activity或者整个application 2. 样式 创建一个样式,根元素 & ...

  4. swift - 开心一刻

    let array = ["one", "two", "three", "four", "five" ...

  5. Ingress使用示例

    Ingress概念介绍 service只能做四层代理 无法做七层代理(如https服务)      lvs只能根据第四层的数据进行转发 无法对七层协议数据进行调度 Ingress Controller ...

  6. linq自定义条件Lambda过滤方法

    Public Func<NoramalClass,bool>simpleComare<NormalClass>(string property,object value) { ...

  7. 【故障处理】imp-00051,imp-00008

    [故障处理]imp-00051,imp-00008 1.1  BLOG文档结构图 1.2  故障分析及解决过程 imp导入报错: IMP-00051: Direct path exported dum ...

  8. Django 之 cookie & session

    Cookie的由来 大家都知道HTTP协议是无状态的. 无状态的意思是每次请求都是独立的,它的执行情况和结果与前面的请求和之后的请求都无直接关系,它不会受前面的请求响应情况直接影响,也不会直接影响后面 ...

  9. zabbix--基础概念及原理

    zabbix 基础概念及工作原理整理 什么是 zabbix? Zabbix 能监控各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统管理员快速定位.解决存在的各种问题.是一个基于 W ...

  10. Elasticsearch 待办

    日期格式:yyyy-MM-dd,改为 yyyy-MM-dd HH:mm:ss.SSS:实体类路径:https://github.com/cag2050/spring_boot_elasticsearc ...