zoukankan      html  css  js  c++  java
  • eclipse下mybatis-generator-config插件

    <?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>
        <!-- 数据库驱动包位置 -->
         <classPathEntry location="/home/user/.m2/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar" />
        <context id="DB2Tables" targetRuntime="MyBatis3">
            <commentGenerator>
                <property name="suppressAllComments" value="true" />
            </commentGenerator>
            <!-- 数据库链接URL、用户名、密码 -->
             <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                connectionURL="jdbc:mysql://192.168.150.50/projectName" userId="root" password="123456" />
            <javaTypeResolver>
                <property name="forceBigDecimals" value="false" />
            </javaTypeResolver>
            
            <!-- 生成模型的包名和位置 -->
            <javaModelGenerator targetPackage="包路径" targetProject="dao-impl">
                <property name="enableSubPackages" value="true" />
                <property name="trimStrings" value="true" />
            </javaModelGenerator>
            <!-- 生成的映射文件包名和位置 -->
            <sqlMapGenerator targetPackage="包路径" targetProject="dao-impl">
                <property name="enableSubPackages" value="true" />
            </sqlMapGenerator>
            <!-- 生成DAO的包名和位置 -->
            <javaClientGenerator type="XMLMAPPER" targetPackage="包路径" targetProject="dao-impl">
                <property name="enableSubPackages" value="true" />
            </javaClientGenerator>
            <!-- 要生成那些表(更改tableName和domainObjectName就可以) -->
    
            <table tableName="tb_order" domainObjectName="Order" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true"/>
        </context>
    </generatorConfiguration>

     http://files.cnblogs.com/files/lizhonghua34/MyBatis_Generator_1.3.1.zip.zip

  • 相关阅读:
    TP-LINK WR941N路由器研究
    thinkjs初试
    记浏览器帐号登录插件开发遇到的问题
    你被adblock坑过吗?
    web应用,我们需要了解什么?
    算法之合并排序
    算法之插入排序
    算法之初体验
    nodejs学习笔记之网络编程
    炫酷吊炸天的nodeppt
  • 原文地址:https://www.cnblogs.com/lizhonghua34/p/6025532.html
Copyright © 2011-2022 走看看