1、配置文件没有注册(解决:在核心配置文件中注册mapper,注册有三种形式。资源路径用斜杆,包和类用点)

    <mappers>
<!--每一个mapper.xml文件都需要在mybatis核心配置文件中被注册-->
<mapper resource="com/zheng/Dao/UserMapper.xml"></mapper> </mappers>

2、绑定接口错误(解决:在mapper.xml文件中,namespace是要实现的接口类)

<mapper namespace="com.zheng.Dao.UserMapper">

3、方法名不对(解决:id是接口中对应的方法名)

   <select id="selectAllUser" resultType="com.zheng.pojo.User">
select * from mybatis.user
</select>

4、返回类型不对

   <select id="selectAllUser" resultType="com.zheng.pojo.User">
select * from mybatis.user
</select>

5、maven导出资源出问题

<!--在build中配置resources,来防止我们资源导出失败的问题-->
<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>

6、时区问题(解决在核心配置文件中)

serverTimezone=Asia/Shanghai"

7、utf-8问题
在核心配置文件和mapper中将utf-8改为utf8

最新文章

  1. 基本矩阵运算的Java实现
  2. CAD二次开发
  3. hdu1166-敌兵布阵(线段树)
  4. 【BZOJ2318】【spoj4060】game with probability Problem 概率DP
  5. ANDROID_MARS学习笔记_S05_005_方向传感器
  6. js下firstElementChild firstChild 以及childNodes和children方法
  7. IOS设计模式学习(21)享元
  8. 第三方库AFNetworking 3.1.0的简单使用
  9. python批量提取eml附件
  10. Linux中断管理 (2)软中断和tasklet
  11. JavaScript原生秒表、计时器
  12. C++ 提取网页内容系列之三
  13. 【Linux】VMware虚拟机中如何配置静态IP
  14. composer----------composer基本命令和遇到一些问题解决方案
  15. spring boot 开发非web应用程序
  16. 谈谈选用技术的原则,技术学习方法技巧,阅读代码的技巧及其它 MSF的一点心得
  17. VC调用DLL
  18. Filter—过滤器
  19. 机器学习之step by step实战及知识积累笔记
  20. angularJs 页面{{xxx}}使用三目运算符

热门文章

  1. Python-基础学习-第二轮
  2. Eclipse里项目名有红叉,但是项目里的每一个文件都没有红叉
  3. Python带我起飞——入门、进阶、商业实战_ 入门版电子书籍分享,
  4. Luogu3870 [TJOI2009]开关 (分块)
  5. 在centos服务器里安装opencv的坑:mportError: libXrender.so.1: cannot open shared object file: No such file or directory and wrong ELF class: ELFCLASS32
  6. 前端必备的 HTTP 知识
  7. 批处理(bat)命令修改xml模板数据
  8. KingbaseES XA 分布式事务
  9. 阿里云Centos7部署私人CSGO服务器
  10. eclipse 统一设置编码_项目工程统一设置成utf8编码_eclipse代码规范