IDEA下mybatis逆向工程
pom文件下引入的插件 <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <configurationFile>${basedir}/src/main/resources/generatorConfig.xml </configurationFile> <overwrite>true</overwrite> <verbose>true</verbose> </configuration> <dependencies> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.version}</version> <!--这里数据版本要和你引入的一致--> </dependency> </dependencies> </plugin> </plugins> resources下的 generatorConfig.xml <?xml version="1.0" encoding=