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

阅读 71

2022-02-23

遇到这种报错,先要问题定位一下。
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)

0 0 举报