mybatis-plus出错:Invalid bound statement (not found): com.kuang.mapper.UserMapper.selectList
mybatis-plus出错:Invalid bound statement (not found): com.kuang.mapper.UserMapper.selectList
·
错误点:
原因:UserMapper继承BaseMapper,让我们看看BaseMapper
可以发现,BaseMapper使用的是范型。所以上边我们UserMapper继承的BaseMapper也要写上对应的范型。
经过修改:
获得正确结果:
[User(id=1, name=Jone, age=18, email=test1@baomidou.com), User(id=2, name=Jack, age=20, email=test2@baomidou.com), User(id=3, name=Tom, age=28, email=test3@baomidou.com), User(id=4, name=Sandy, age=21, email=test4@baomidou.com), User(id=5, name=Billie, age=24, email=test5@baomidou.com)]

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)