Maven打包springboot触发mybaits-generator

在pom.xml文件下

<groupId>org.mybatis.generator</groupId>
         <artifactId>mybatis-generator-maven-plugin</artifactId>
          <version>1.3.2</version>
          <configuration>
                  <configurationFile>src/main/resources/generatorConfig.xml</configurationFile>
                    <verbose>true</verbose>
                    <overwrite>true</overwrite>
</configuration>

的后面加上

<executions>
                    <execution>
                        <id>Generate MyBatis Artifacts</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
  </executions>
发布了4 篇原创文章 · 获赞 4 · 访问量 1282

猜你喜欢

转载自blog.csdn.net/weixin_43847401/article/details/103194170