springboot开发接口报错Optional int par

2018-12-20  本文已影响0人  大胡子的机器人

springboot开发接口报错
Optional int parameter 'userId' 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

image.png

原来是这样的:


image.png

解决方案:


image.png
上一篇下一篇

猜你喜欢

热点阅读