报错描述:

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.

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 dec

 

错误描述:

这里的rank这个字段是int类型,但是在这个参数定义不是非必须的,系统会自动给这个字段赋值为null值,但是int类型不能接收null值)

解决:

int类型改成Integer封装类型

但要注意空指针处理

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-07-06
相关资源
相似解决方案