1. 引入依赖
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatisplus-spring-boot-starter</artifactId>
<version>1.0.5</version>
</dependency>
2. 修改配置文件
将mapper的扫描路径配置由mybatis改为mybatis-plus:
mybatis:
type-aliases-package: com.szl.entity
mapper-locations: classpath:mapper/*.xml
改为:
mybatis-plus:
type-aliases-package: com.szl.entity
mapper-locations: classpath:mapper/*.xml
3. 修改entity
@TableName("customer")
public class Customer implements Serializable{
/**
*
*/
@TableField(exist = false)
priv