1.引入依赖:pom.xml 导入 MyBatis Plus Generator和lombok
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>Latest Version</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>3.3.1.tmp</version>
</dependency>
//这里使用了lombok
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
2.启动类编写
package com.hw.mybatisplus;
import com.hu.mybatisplus.annotation.DbType;
import com.hu.mybatisplus.core.exceptions.MybatisPlusException;
import com.hu.mybatisplus.core.toolkit.StringUtils;