IDEA搭建Mybatis项目时报错:java.io.IOException: Could not find resource com/itheima/dao/IUserDao.xml

时间:2024-04-03 12:15:14

Mybatis报错:
IDEA用Maven创建mybatis工程时出现错误

Error building SqlSession.

The error may exist in com/itheime/dao/IUserDao.xml

Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com/itheime/dao/IUserDao.xml

IDEA搭建Mybatis项目时报错:java.io.IOException: Could not find resource com/itheima/dao/IUserDao.xml

图片中标记的目录必须是一级一级建造好的,而不是这样

IDEA搭建Mybatis项目时报错:java.io.IOException: Could not find resource com/itheima/dao/IUserDao.xml

应该有三个目录,且要和IUserDao所在的目录名完全一样才行