mybatis框架学习
文章平均质量分 53
更好的自己520
这个作者很懒,什么都没留下…
展开
-
mybatis的增删改查操作
public interface TestPaperTestsMapper { int deleteByPrimaryKey(Integer testpaperTestsId); int insert(TestPaperTests record); int insertSelective(TestPaperTests record); TestPaperTes...原创 2018-05-26 23:02:40 · 164 阅读 · 0 评论 -
mybatis的入门项目
1:开发环境配置jar包2:Mybatis的配置文件conf.xml,定义操作users表的sql映射文件userMapper.xml3:在conf.xml文件中注册userMapper.xml文件参考:https://www.cnblogs.com/xdp-gacl/p/4261895.html...转载 2018-05-27 00:01:09 · 118 阅读 · 0 评论 -
Mybatis中ResultMap的作用
这种情况主要用于解决实体类属性名与数据库表中字段名不一致的情况下,解决将查询结果映射成实体对象。 1、准备实体类public class Emp2 { private Integer eid; private String ename; private Integer eage; }2、修改映射文件–添加代码<resultMap t...转载 2018-06-24 16:30:34 · 14199 阅读 · 1 评论