zoukankan      html  css  js  c++  java
  • generatorConfig.xml自动生成实体类,dao和xml

    <?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:Toolsmysql-connector-java-5.1.48mysql-connector-java-5.1.48.jar" />
    <context id="OracleTables" targetRuntime="MyBatis3">
    <commentGenerator>
    <property name="suppressAllComments" value="true" />
    </commentGenerator>
    <!--数据库连接信息-->
    <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://127.0.0.1:3306/ecsb_dev"
    userId="root" password="123456">
    </jdbcConnection>
    <javaTypeResolver>
    <property name="forceBigDecimals" value="false" />
    </javaTypeResolver>
    <javaModelGenerator targetPackage="com.crt.openapi.modules.common.domain.entity" targetProject="ecsb-apidomain">
    <property name="enableSubPackages" value="true" />
    <property name="trimStrings" value="true" />
    </javaModelGenerator>
    <sqlMapGenerator targetPackage="com.crt.openapi.modules.common.domain.dao" targetProject="ecsb-apidomain">
    <property name="enableSubPackages" value="true" />
    </sqlMapGenerator>
    <javaClientGenerator type="XMLMAPPER" targetPackage="com.crt.openapi.modules.common.domain.dao" targetProject="ecsb-apidomain">
    <property name="enableSubPackages" value="false" />
    </javaClientGenerator>
    <table tableName="api_menu_resource" domainObjectName="ApiMenuResource"
    enableCountByExample="true" enableDeleteByExample="true"
    enableDeleteByPrimaryKey="true" enableInsert="true"
    enableSelectByExample="true" enableSelectByPrimaryKey="true"
    enableUpdateByExample="true" enableUpdateByPrimaryKey="true" >
    </table>
    </context>
    </generatorConfiguration>

    <!--代码生成器依赖 -->
    <build>
    		<plugins>
    			 <plugin>
                    <groupId>org.mybatis.generator</groupId>
                    <artifactId>mybatis-generator-maven-plugin</artifactId>
                    <version>1.3.2</version>
                    <configuration>
                        <verbose>true</verbose>
                        <overwrite>true</overwrite>
                    </configuration>
                </plugin>
    		</plugins>
    	</build>
    

      




    eclipse插件下载地址: https://i.cnblogs.com/Files.aspx
  • 相关阅读:
    美国首位女计算机博士荣获今年图灵奖
    此人需要关注一下
    Microsoft的壮大与IBM对Sun的收购
    文章介绍:Sexy Lexing with Python
    程序员的门道
    闲谈:敏捷与否的区分方法、对组织内部人员的现实作用与长远利益
    聊聊最俗的工厂相关话题
    人之患在好为人师
    TIOBE的头头儿和“反Java”的教授
    敏捷的核心究竟是什么
  • 原文地址:https://www.cnblogs.com/hikoukay/p/11651980.html
Copyright © 2011-2022 走看看