鞠小军

导航

逆向工程mybatis-geneator.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>
<!-- 驱动jar包,mssql使用jtds-1.2.jar,mysql使用mysql-connector-java-5.0.8-bin.jar -->
<classPathEntry
location="C:\Users\Administrator\Desktop\jar\mysql-connector-java-5.1.18-bin.jar" />

<context id="FreeCMS_Tables" targetRuntime="MyBatis3">

<!-- 注释 -->
<commentGenerator >
<property name="suppressAllComments" value="false"/><!-- 是否取消注释 -->
<property name="suppressDate" value="true" /> <!-- 是否生成注释代时间戳-->
</commentGenerator>

<!-- mysql配置 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/mybatis" userId="root"
password="745412">
</jdbcConnection>

<javaTypeResolver>
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>

<!-- model生成文件的存放位置 -->
<javaModelGenerator targetPackage="com.yanglf.entity"
targetProject="TestMybatis">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>

<!-- sqlmap生成文件的存放位置 -->
<sqlMapGenerator targetPackage="com.yanglf.mapper"
targetProject="TestMybatis">
<property name="enableSubPackages" value="true" />
</sqlMapGenerator>

<!-- dao生成文件的存放位置 -->
<javaClientGenerator type="XMLMAPPER"
targetPackage="com.yanglf.dao"
targetProject="TestMybatis">
<property name="enableSubPackages" value="true" />


</javaClientGenerator>

<!-- 要生成的表 -->
<table tableName="order_detail" domainObjectName="order_detail"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>
<table tableName="orders" domainObjectName="orders"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>
<table tableName="person" domainObjectName="person"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>

</context>
</generatorConfiguration>
---------------------

大家可以关注我csdn博客,谢谢啦

 

http://howzhi.com/group/274/discuss/266080

 

http://howzhi.com/group/274/discuss/266081

posted on 2019-05-17 22:28  binghuojxj  阅读(243)  评论(0编辑  收藏  举报