zoukankan      html  css  js  c++  java
  • mybatis逆向工程配置文件

    <?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>
    <context id="DB2Tables" targetRuntime="MyBatis3">
    <!-- 生成mysql带有分页的sql的插件 这个可以自己写,-->

    <!-- 自定义的注释规则,继承 DefaultCommentGenerator 重写 一些方法 -->
    <commentGenerator >
    <!-- 是否去除自动生成日期的注释 true:是 : false:否 -->
    <property name="suppressDate" value="true"/>
    <!-- 是否去除所有自动生成的注释 true:是 : false:否 -->
    <property name="suppressAllComments" value="true"/>
    </commentGenerator>


    <jdbcConnection driverClass="com.mysql.jdbc.Driver"

    connectionURL="jdbc:mysql:///数据库名?useUnicode=true&amp;characterEncoding=utf-8&amp;useSSL=true"
    userId=" "
    password=" ">
    </jdbcConnection>
    <!-- <jdbcConnection driverClass="oracle.jdbc.OracleDriver"

    connectionURL="jdbc:oracle:thin:@127.0.0.1:1521:myoracle"
    userId=" "
    password=" ">
    </jdbcConnection>-->
    <!--生成entity类存放位置-->
    <javaModelGenerator targetPackage="com.offcn.bean"
    targetProject="./src">
    <property name="enableSubPackages" value="true"/>
    <property name="trimStrings" value="true"/>
    </javaModelGenerator>
    <!--生成映射文件存放位置-->
    <sqlMapGenerator targetPackage="com.offcn.mapper"
    targetProject="./src">
    <property name="enableSubPackages" value="true"/>
    </sqlMapGenerator>
    <!--生成Dao类存放位置-->
    <javaClientGenerator type="XMLMAPPER" targetPackage="com.offcn.dao"
    targetProject="./src">
    <property name="enableSubPackages" value="true"/>
    </javaClientGenerator>
    <table tableName="表名"></table>


    </context>
    </generatorConfiguration>
  • 相关阅读:
    [最短路径SPFA] POJ 1847 Tram
    [强连通分量] POJ 1236 Network of Schools
    [强连通分量] POJ 2762 Going from u to v or from v to u?
    [强连通分量] POJ 2186 Popular Cows
    [宽度优先搜索] HDU 1372 Knight Moves
    php错误级别和异常处理
    php配置优化
    魔术方法和魔术常量
    事务
    mysql备份和还原
  • 原文地址:https://www.cnblogs.com/seaWaveQin/p/13153535.html
Copyright © 2011-2022 走看看