接口测试的时候遇到了一个问题,导致测试阻断了好久,在此记录,谨防忘记. 具体报错如下: Optional int parameter 'pId' 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. 接口…
严重: Servlet.service() for servlet [note-portal] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Optional long parameter 'noteBookId' is present but cannot be translated into a n…
今天在操作redis的时候报了这个错:Optional int parameter 'time' is present but cannot be translated into a null value due to being decla 这句话意思:参数time存在,但是无法将其转为为null 查看了下原因,time这个字段是用来记录设置多久时间过期的, 我在service层设置的是Long 类型, 我在Controller 层设置的是long类型,前后设置的不一样,猜测前后需要设置一致,…
错误日志: 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 typ…
问题描述: 好久不写博客了,今天遇到一个问题,那就是post请求时,参数接收不到,当时我很纳闷,看代码: 就是这样几个参数,我使用postman请求时无法获取参数: 报错信息: "msg":"Optional int parameter 'tableId' is present but cannot be translated into a null value due to 后来上网查了相关资料: 接口测试的时候遇到了一个问题,导致测试阻断了好久,在此记录,谨防忘记. 具体…