新建的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操作。
本文出自 “JodyRex” 博客,请务必保留此出处http://503431920.blog.51cto.com/6681280/1707470
原文:http://503431920.blog.51cto.com/6681280/1707470