使用Mybatis-Generator自动生成Dao、Model、Mapping

"1.0" encoding="UTF-8"?>

  PUBLIC"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"

  "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">


  location="mysql-connector-java-5.1.47.jar"/>

  id="DB2Tables"    targetRuntime="MyBatis3">

   

      name="suppressDate" value="true"/>

      name="suppressAllComments" value="true"/>

   


    driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:9988/assure_sale?useUnicode=true" userId="assure_sale" password="123456">

   

   

      name="forceBigDecimals" value="false"/>

   


    targetPackage="lcw.model" targetProject="/Users/humenglong/Desktop/work/baoliang/mybatis">

      name="enableSubPackages" value="true"/>

      name="trimStrings" value="true"/>

   


    targetPackage="lcw.mapping" targetProject="/Users/humenglong/Desktop/work/baoliang/mybatis">

      name="enableSubPackages" value="true"/>

   


    type="XMLMAPPER" targetPackage="lcw.dao" targetProject="/Users/humenglong/Desktop/work/baoliang/mybatis">

      name="enableSubPackages" value="true"/>

   


   

tableName="as_plan_approval" domainObjectName="PlanApproval" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"  selectByExampleQueryId="false">

 

命令   java -jar mybatis-generator-core-1.4.0.jar -configfile generatorConfig.xml -overwrite

你可能感兴趣的:(使用Mybatis-Generator自动生成Dao、Model、Mapping)