![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis
欲乘风
这个作者很懒,什么都没留下…
展开
-
Mysql+Mybatis分页查询
一,首先做一个查询所有并显示 dao public interface ProductDAO { public List<Product> list(); } mapper <mapper namespace="hust.mm.dao.ProductDAO"> <select id="list" resultType="Product"> s..原创 2018-12-16 19:40:25 · 2297 阅读 · 0 评论 -
MyBatis中多表查询
一,关系 一对多 多对一 多对多 先看一对多 实体类 public class Category { private int id; private String name; List<Product> products; ... } mapper 使用collection标签指定一对多关系 <resultMap type="C...原创 2018-12-16 20:01:44 · 144 阅读 · 0 评论