保留一个mybatis逆向工程的配置文件
去掉了所有的example方法(个人不喜欢Example)
generatorConfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<properties resource="generatorConfig.properties"/>
<!--数据库驱动jar -->
<classPathEntry location="E:\Mave_Repository\mysql\mysql-connector-java\5.1.18\mysql-connector-java-5.1.18.jar" />
<!--
targetRuntime
MyBatis3:带有Example类【默认】
MyBatis3Simple:没有Example类
-->
<context id="techouse_usersystem" targetRuntime="MyBatis3" >
<commentGenerator>
<!--
suppressAllComments
false : 生成注释[defalut]
true : 不生成
-->
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<jdbcConnection connectionURL="jdbc:mysql://localhost:3306/techouse_usersystem"
driverClass="com.mysql.jdbc.Driver" password="root" userId="root" />
<!-- targetProject -->
<javaModelGenerator targetPackage="${basePackage}.entity" targetProject="${targetProject}" >
<!--
enableSubPackages:默认false
-->
<property name="enableSubPackages" value="true"/>
</javaModelGenerator>
<sqlMapGenerator targetPackage="${basePackage}.mapper" targetProject="${targetProject}" >
<!--
enableSubPackages:默认false
-->
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<javaClientGenerator targetPackage="${basePackage}.mapper" type="XMLMAPPER" targetProject="${targetProject}" >
<!--
enableSubPackages:默认false
-->
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<table tableName="cons_system_codes"
domainObjectName="ConsSystemCode"
enableCountByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
enableUpdateByExample="false"
/>
<!--
<table tableName="sys_users" domainObjectName="SysUser" />
<table tableName="sys_roles" domainObjectName="SysRole" />
-->
</context>
</generatorConfiguration>
属性文件generatorConfig.properties
targetProject=[工程名]
basePackage=cn.techouse.usersystem