zoukankan      html  css  js  c++  java
  • Mybatis的逆向工程

    <!DOCTYPE generatorConfiguration
    PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
    "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
    <generatorConfiguration>

    <!--指定特定数据库的jdbc驱动jar包位置-->
    <classPathEntry location="E:apache-maven-3.3.3idea_maven epositorymysqlmysql-connector-java5.1.45mysql-connector-java-5.1.45.jar"/>
    <context id="default" targetRuntime="MyBatis3">
    <commentGenerator>
    <property name="suppressDate" value="true" />
    <property name="suppressAllComments" value="true"/>
    </commentGenerator>
    <!-- 数据库连接 -->
    <jdbcConnection driverClass="com.mysql.jdbc.Driver"
    connectionURL="jdbc:mysql://localhost/petmanager"
    userId="root" password="root">
    </jdbcConnection>

    <!-- 非必需 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
    NUMERIC 类型解析为java.math.BigDecimal -->
    <javaTypeResolver>
    <property name="forceBigDecimals" value="false"/>
    </javaTypeResolver>

    <!-- Model生成规则 -->
    <javaModelGenerator targetPackage="com.ysq.generator.entity"
    targetProject="E://idea_2018//Workspace//JavaWebWorkSpace//maven-parent//maven-web-02//src//main//java">
    <property name="trimStrings" value="true" />
    </javaModelGenerator>
    <!--Mapper文件生成-->
    <sqlMapGenerator targetPackage="com.ysq.generator.mapper"
    targetProject="E://idea_2018//Workspace//JavaWebWorkSpace//maven-parent//maven-web-02//src//main//java"/>
    <!-- dao 规则 -->
    <javaClientGenerator targetPackage="com.ysq.generator.dao"
    targetProject="E://idea_2018//Workspace//JavaWebWorkSpace//maven-parent//maven-web-02//src//main//java"
    type="XMLMAPPER" >
    <property name="enableSubPackages" value="true" />
    </javaClientGenerator>


    <table tableName="%" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
    enableSelectByExample="false" selectByExampleQueryId="false">

    <!--<domainObjectRenamingRule searchString="^tb" replaceString="" />-->
    <generatedKey column="id" sqlStatement="Mysql"/>
    </table>
    </context>
    </generatorConfiguration>
  • 相关阅读:
    学习JNA,Jnative
    JNative用法注意事项
    使用JNA替代JNI调用本地方法
    傅盛读书笔记:下一个Moonshot是什么?
    华为内部狂转好文:有关大数据,看这一篇就够了
    ws2_32.dll的妙用与删除 (禁网)
    保护颈椎重点按这三大穴位(图)
    在java中调用python方法
    在Windows中实现Java调用DLL(转载)
    java程序员,英语那点事
  • 原文地址:https://www.cnblogs.com/ysq0908/p/11111497.html
Copyright © 2011-2022 走看看