0
点赞
收藏
分享

微信扫一扫

mybatis-mysql-查询数据时报错的解决办法?

程序小小黑 2022-02-23 阅读 70

遇到这种报错,先要问题定位一下。
java.lang.UnsupportedOperationException: null

The error may involve rongji.user.mapper.UserDao.selectById

The error occurred while handling results

SQL: select * from tbl_user where id = ?

Cause: java.lang.UnsupportedOperationException] with root cause**

遇到上边这种报错,一般都是写SQL语句时,返回类型写错了!

错误示例:
在这里插入图片描述修改后:
在这里插入图片描述
这样就解决了!总结:查询数据时,一定要确定好返回数据的类型,细心一点,下次就不会再出错咯!

举报

相关推荐

0 条评论