码迷,mamicode.com
首页 > 其他好文 > 详细

去掉Mybatis Generator生成的一堆Example类

时间:2017-08-10 16:58:12      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:general   bat   需要   tab   mave   property   select   date   enabled   

上篇讲了如何使用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啦!

去掉Mybatis Generator生成的一堆Example类

标签:general   bat   需要   tab   mave   property   select   date   enabled   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!