摘要: 整合mybatis-plus(三) 查询操作 根据ID查询用户 //根据ID查询用户 @Test public void testSelectById(){ User user = userMapper.selectById(1L); System.out.println(user); } 批量查询 阅读全文
posted @ 2021-07-02 12:05 转身刹那的潇洒 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 整合mybatis-plus(二) 插入数据 @Test public void testInsert(){ User user = new User(); user.setName("张三"); user.setAge(18); user.setEmail("963330213@qq.com"); 阅读全文
posted @ 2021-07-02 10:47 转身刹那的潇洒 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 整合mybatis-plus(一) Mybatis-plus简介 MyBatis-Plus (opens new window)(简称 MP)是一个 MyBatis (opens new window)的增强工具,在 MyBatis 的基础上只做增强不做改变,为简化开发、提高效率而生。 特性 无侵入 阅读全文
posted @ 2021-07-02 01:27 转身刹那的潇洒 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 整合mybatis 整合mybatis 一、新建springboot项目,引入以下三个依赖 二、导入mybatis依赖 <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starte 阅读全文
posted @ 2021-07-02 00:32 转身刹那的潇洒 阅读(71) 评论(0) 推荐(0) 编辑