mybatis 逆向工程 文件

安装好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>
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容