Mybatis注解学习--xxxMapper is not known to the MapperRegistry
2014-04-09 10:24
555 查看
今天晚上在学习Mybatis注解的时候,总是遇到错误Type interface com.souvi.ibatis.xxxMapper is not known to
the MapperRegistry,在网上搜索相关的解决方案时,得到的答案都不怎么详细,但知道了Mybatis注解一定要注册自己写的接口类,不然就会老报开头提到的这个错误。
下面举个例子:先看看项目的简单部署吧,如图:
先看核心文件,UserTest.java
?
主要要注意的是比如要注册,也就是这行代码:
?
UserInfoMapper.java代码如下:
?
user.java 代码如下:
?
最后的configure.xml文件代码为:
?
the MapperRegistry,在网上搜索相关的解决方案时,得到的答案都不怎么详细,但知道了Mybatis注解一定要注册自己写的接口类,不然就会老报开头提到的这个错误。
下面举个例子:先看看项目的简单部署吧,如图:
先看核心文件,UserTest.java
?
?
?
?
?
相关文章推荐
- Mybatis出现Type interface XXXMapper is not known to the MapperRegistry.的解决办法。
- mybatis问题is not known to the MapperRegistry
- Type interface mapper.XxxMapper is not known to the MapperRegistry.
- Type interface com.xxx.xx.xxxDao is not known to the MapperRegistry
- 解决org.apache.ibatis.binding.BindingException: Type interface xxx is not known to the MapperRegistry
- Type interface XXXMapper is not known to the MapperRegistry 解决办法
- Type interface com.mybatis.mapper.UserMapper is not known to the MapperRegistry. 解决方法
- [练习][错误]MyBatis出错:Type interface com.dao.SubjectDao is not known to the MapperRegistry
- mybatis 错误提示:is not known to the MapperRegistry.
- Type interface com.mybatis.mapper.StudentMapper is not known to the MapperRegistry
- Type interface "xxxxxxxx" is not known to the MapperRegistry
- mapper is not known to the MapperRegistry
- xxxx is not known to the MapperRegistry 的
- Type interface com.hk.ssm.mapper.StudentMapper is not known to the MapperRegistry.
- FAQ(10):Type interface com.smbms.dao.UserMapper is not known to the MapperRegistry.
- Type interface com.binarysoft.service.region.RegionDAO is not known to the MapperRegistry.
- Mybatis报错——Type interface com.mapper.EmployeeMapper is already known to the MapperRegistry.
- Type interface mapper.UserMapper is not known to the MapperRegistry.
- Type interface is not known to the MapperRegistry.的解决办法
- Type interface com.mapper.GradeMapper is not known to the MapperRegistry的解决办法