美文网首页
mybatis 逆向工程 文件

mybatis 逆向工程 文件

作者: 孤独的人生旅途 | 来源:发表于2020-06-21 22:47 被阅读0次

    安装好mybaties 插件后执行你想工程脚本。

    <?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="D:\Maven\repository\org\postgresql\postgresql\9.4.1212.jre7\postgresql-9.4.1212.jre7.jar" />
        <context id="context1">
            <commentGenerator>
                <!-- 是否去除自动生成的注释 true:是 : false:否 -->
                <property name="suppressAllComments" value="true" />
            </commentGenerator>
            <!-- 数据库链接URL、用户名、密码 -->
            <jdbcConnection connectionURL="jdbc:postgresql://10.25.81.215:54321/rrmp"
                driverClass="org.postgresql.Driver" password="123456" userId="postgres" />
            <!-- 生成模型的包名和位置 -->
            <javaModelGenerator targetPackage="com.paic.rrmp.entity.rrmpOtherDimension"
                targetProject="rrmp-service/src/main/java" />
            <!-- 生成的映射文件报名和位置 -->
            <sqlMapGenerator targetPackage="mapper.rrmpOtherDimension" targetProject="rrmp-service/src/main/resources" />
            <!-- 生成DAO的包名和位置 -->
            <javaClientGenerator targetPackage="com.paic.rrmp.dao.rrmpOtherDimension"
                targetProject="rrmp-service/src/main/java" type="XMLMAPPER" />
    
      <table tableName="rrmp_other_dimension" domainObjectName="RrmpOtherDimension" schema="public"
       enableCountByExample="false"
       enableUpdateByExample="false" 
       enableDeleteByExample="false" enableSelectByExample="false" 
       selectByExampleQueryId="false"></table> 
            <!-- <table schema="public" tableName="rrmp_menu"
                domainObjectName="rrmpMenu" enableCountByExample="false"
                enableUpdateByExample="false" enableDeleteByExample="false"
                enableSelectByExample="false" selectByExampleQueryId="false">
            </table> -->
        </context>
    </generatorConfiguration>
    

    相关文章

      网友评论

          本文标题:mybatis 逆向工程 文件

          本文链接:https://www.haomeiwen.com/subject/luldpqtx.html