Mybatis常见错误

Mybatis在初始化配置时的常见错误

1、数据库的密码错误

image

2、数据库的名字错误

image

3、数据库表不存在

image

4、namespace是对应的持久层的XxxxMapper的全域名

image

5、返回值的个数异常

image

6、Xxxxmapper.xml中的数据类型异常,大概率出现在select查询语句中

image

image

7、错误参数异常,sql语句为空

![image](https://img2024.cnblogs.com/blog/3672336/202507/3672336-20250709203632398-694809712.png)

8、sql语句中有错误

![image](https://img2024.cnblogs.com/blog/3672336/202507/3672336-20250709204101161-153191584.png)

9、未知的列明

![image](https://img2024.cnblogs.com/blog/3672336/202507/3672336-20250709205106956-832721112.png)

10、类驱动加载异常

![image](https://img2024.cnblogs.com/blog/3672336/202507/3672336-20250709205521050-1283569941.png)
posted @ 2025-07-09 17:11  K747  阅读(27)  评论(0)    收藏  举报