Optional int parameter 'rank' is present but cannot be translated into a null value due to being dec
报错描述:
Optional int parameter 'rank' 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.
错误描述:
这里的rank这个字段是int类型,但是在这个参数定义不是非必须的,系统会自动给这个字段赋值为null值,但是int类型不能接收null值)
解决:
int类型改成Integer封装类型
但要注意空指针处理