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即可

posted @ 2019-08-07 17:12  無玑小姐  阅读(1097)  评论(0编辑  收藏  举报