摘要: 实体类Mapper接口 void addUser(User user); Mapper.xml <insert id="addUser" useGeneratedKeys="true" keyProperty="id"> insert into user_t(user_name,password,a 阅读全文
posted @ 2017-04-06 16:41 Always_July 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 官方文档 Mapper接口 第一种方法 ArticleMapper.xml UserMapper.xml ArticleMapper.xml 中使用的是UserMapper的查询方法的接口,这样有两个查询语句,一个查询文章,一个查询用户。 这种方式很简单, 但是对于大型数据集合和列表将不会表现很好。 阅读全文
posted @ 2017-04-06 15:35 Always_July 阅读(2894) 评论(0) 推荐(0) 编辑