Controller中方法的参数类型导致的问题

Controller中方法的参数类型如果为基本数据类型,如int、long,在访问该方法传递的值为null时,就会报错,所以,应该将类型声明为对应的包装类型,如Integer、Long。

猜你喜欢

转载自blog.csdn.net/qq_29025955/article/details/108097633
今日推荐