1.创建Maven项目
2.在pom文件中添加plugin
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<configurationFile>src/main/resources/generatorConfig.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
</plugin>
3.添加依赖jar包
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>