关于 There is no getter for property named 'id' in 'class java.lang.Integer'

在写SSM框架的时候,请求报出 There is no getter for property named 'id' in 'class java.lang.Integer'这个问题

但是实际上实体类中写了相关的方法,最后找到问题出现在Mapper接口中,

 List<User> getAllUser( Integer id);

将代码改为:

List<User> getAllUser(@Param("id") Integer id);

问题解决

猜你喜欢

转载自blog.csdn.net/qq_30604989/article/details/81297400