控制台There is no getter for property named id in class java.lang.Integer问题解决

解决There is no getter for property named ‘id’ in 'class java.lang.Integer’问题

写后台业务时,有个通过id查询单条数据的需求,写完后测试接口发现一直报错。
postman反馈数据
postman反馈数据
idea控制台报错
idea控制台报错
解决办法:
将注解改成@Param(“xx”)。也就是
方法名(@Param(“id”) Integer id)
解决!
mapper接口中添加注解
postman接口测试拿到单条数据
postman单条数据