去掉Mybatis Generator生成的一堆Example类

上篇讲了如何使用Mybatis Generator生成代码,但是再生成过程中,往往出现一大堆的Example类,而这些Example中的很多方法我们是不需要用到的,因此在生成之前我们可以添加如下代码:

<table schema="general" tableName="tb_table_name" domainObjectName="EntityName"
    enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
    enableSelectByExample="false" selectByExampleQueryId="false" >
    <property name="useActualColumnNames" value="true"/>
</table>

 右击项目--->run as--->maven build就OK啦!

原文地址:https://www.cnblogs.com/jbml-154312/p/7339801.html