(1)MyBatis-Plus(简称 MP)是一个 MyBatis 的增强工具,在 MyBatis 的基础上只做增强不做改变,为简化开发、提高效率而生。
愿景:成为 MyBatis 最好的搭档,就像 魂斗罗 中的 1P、2P,基友搭配,效率翻倍。
(2)Mybatis 与 JPA
MyBatis:简单的CRUD需要写sql语句,如果修改项目要修改大量xml,但很灵活
JPA(Java Persistence API,Java持久层API)MyBatis plus:通过注解以及接口方法,实现Java持久化功能
(3)SpringBoot + Mybatis plus单表Junit测试步骤:
引入依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework