新建的maven工程,裏面加入了mybatis的generator功能的話,那個pom文件裏有個配置的地方就是
<!-- Mybatis generator --> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>${version.maven.mybatis.generator.plugin}</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> <dependencies> <dependency> <groupId>com.roiland</groupId> <artifactId>usc-framework</artifactId> <version>${version.roiland.custom.usc.framework}</version> </dependency> </dependencies> </plugin>
這裏就這樣寫就行了,我之前也不知道從哪兒copy的,加上了個
<executions> <execution> <id>Generate MyBatis Artifacts</id> <goals> <goal>generate</goal> </goals> </execution> </executions>
然後就導致了,我每次執行maven的install的時候,就會默認執行一次這個generator操作。