Mybatis错误:Type interface com.dao.UserDao is not known to the MapperRegistry.
1.编写简单的mybatis架构后,运行显示出现错误:Type interface com.dao.UserDao is not known to the MapperRegistry.
2.添加mybatis-config.xml中<mappers>代码
<mappers><mapper resource="com/dao/UserMapper.xml"/></mappers>
出现错误:Could not find resource com/dao/UserMapper.xml
3.在pom.xml中</project>前添加一下代码,之后刷新maven 运行成功
<!-- 设置资源目录,使其可以读取dao下xml文件--><build><resources><resource><directory>src/main/resources</directory><includes><include>**/*.properties</include><include>**/*.xml</include></includes><filtering>true</filtering></resource><resource><directory>src/main/java</directory><includes><include>**/*.properties</include><include>**/*.xml</include></includes><filtering>true</filtering></resource></resources></build>
Mybatis错误:Type interface com.dao.UserDao is not known to the MapperRegistry.相关推荐
- Type interface com.dao.StudentDao is not known to the MapperRegistry.
在使用SqlSession的getMapper(StudentDao.class)方法中遇到的问题:Type interface com.dao.StudentDao is not known to ...
- mybatis错误:Type interface com.sks.dao.UserDao is not known to the MapperRegistry.
mybatis错误org.apache.ibatis.binding.BindingException: Type interface com.sks.dao.UserDao is not known ...
- Type interface com.haroro.dao.UserDao is not known to the MapperRegistry——MyBatis问题
初学MyBatis的时候,往往出现的错误都是一些细节上引起的.今天就遇到了一个问题,在运行测试类的时候,出现了以下的错误提示: org.apache.ibatis.binding.BindingExc ...
- Error instantiating interface com.dao.UserDao with invalid types () or values (). Cause: java.lang.N
报错结果 ### Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating interface com. ...
- mybatis报错Type interface xxx.Dao is not...
今天在做mybatis的时候,遇到一个错误,大家看看这个错误吧:org.apache.ibatis.binding.BindingException: Type interface cn.mybati ...
- mybatis报错Type interface xxx.Dao is not known to the MapperRegistry
今天在做mybatis的时候,遇到一个错误,大家看看这个错误吧:org.apache.ibatis.binding.BindingException: Type interface cn.mybati ...
- Consider defining a bean of type ‘com.zsb.dao.UserDao‘ in your configuration.
在网上找了很多中的方法去修改它 比如有很多都是说的报错原因是因为在Mapper或者Dao层缺少注解 或者是service层等等,我就不再赘述了,很明显我的不是因为这种情况 这个问题就是@SpringB ...
- Description: A component required a bean of type ‘com.jia.dao.UserDao‘ that
解决办法:在启动类上添加@MapperScan("com.jia.dao") @MapperScan("com.jia.dao") @SpringBootApp ...
- Mybatis报错org.apache.ibatis.binding.BindingException: Type interface com.trf.dao.UserDao is not known
报错log:org.apache.ibatis.binding.BindingException: Type interface com.trf.dao.UserDao is not known to ...
最新文章
- 求5个学生4门成绩的总分和平均分
- [*开同*看] 星际情书
- 腾讯老照片修复算法开源,细节到头发丝,3种预训练模型可下载 | GitHub热榜
- 学习《Hardware-Efficient Bilateral Filtering for Stereo Matching》一文笔记。
- 如何恢复master数据库
- [导入]php 安全基础 第八章 共享主机 文件系统浏览
- 安装win7系统不能开机启动服务器,win7系统开机启动项不能加载的原因分析及解决...
- 程序员需要了解的一点组织行为学知识
- 【效率专精系列】善用API统一描述语言提升RestAPI开发效率
- Modbus协议栈应用实例之二:Modbus RTU从站应用
- Per-class allocator 2
- 【python3.X】python学习中排雷过程^_^
- NSCache实现内存缓存
- virbox protector 为软件设置有效期_条码软件如何打印UCC-128条形码
- python-坦克射击飞机
- 富爸爸实现财务自由七步骤
- 利用 confluence 打造属于自己的知识库
- 使用WampServer搭建自己的网站
- 记一次github 翻车事件
- 【嵌入式】51单片机+1602+dht11显示温湿度