后端开发记事

钎探穗

关注

阅读 141

2022-02-22

1. 在开发过程中,前端没有捕获到int类型的id 报错

查阅资料后应该为

Optional int parameter 'xx' is present but cannot be translated into a null value!!_博客菜鸟飞飞飞的博客-CSDN博客

int不接受为null,所以当bean中的类属性为int时,返回值没有设置,会自动为0.

以后要注意为Integer

精彩评论(0)

0 0 举报