Optional int parameter 'id' is present but cannot be translated into a null value due to being

执行

## ........(int id);

报出以下错误。

Optional int parameter 'id' is present but cannot be translated into a null value due to being

这个错误是因为java获取页面数据的时候,id值可能为空,而int的默认值为0,若想能够接受NULL的值,将int换成integer即可解决。

猜你喜欢

转载自blog.csdn.net/baidu_38878945/article/details/82819576