idea 打包maven项目generatorConfig.xml执行 dao和mapper覆盖问题

用 idea 打包时遇到 generatorConfig.xml 会执行,将修改过后的dao和mapper会被覆盖掉问题。

在pom文件<plugin>中generatorConfig.xml设置中添加<phase>deploy</phase>如下:

<executions>
	<execution>
		<id>Generate MyBatis Artifacts</id>
		<!--加入下行打包时不会执行 generatorConfig.xml -->
		<phase>deploy</phase>
		<goals>
		    <goal>generate</goal>
		</goals>
	</execution>
</executions>

猜你喜欢

转载自blog.csdn.net/wh15842400641/article/details/86152216