mybatis 错误提示:Type interface com.xiaoma.dao.UserMapper is not known to the MapperRegistry.
mybatis 错误提示:Type interface com.xiaoma.dao.UserMapper is not known to the MapperRegistry.
·
错误信息: is not known to the MapperRegistry. 意思是说没有找到对应mapper注册文件。
解决办法:
1:查看mapper.xml的namespace是不是对应的DAO全路径。
2:查看是不是这个mapper没有添加到mybatis-config.xml文件中。
3:低级错误,数据库中没有对应的表
我的问题是第二种情况,没有在mybatis-config.xml文件中添加映射
更多推荐
已为社区贡献1条内容
所有评论(0)