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
  • 相关阅读:
    DFT
    BSDL
    穆尼里奥:未派上最好点球手;齐达内成功并不意外
    module使用和设置
    APU (美国AMD公司研发的加速处理器)
    Lucio: We avoided Mourinho after every loss
    高位压迫——萨基给世界足坛带来的技术革命
    穆里尼奥:曼联没有在今夏尝试过签下C罗
    Linux 的 Out-of-Memory (OOM) Killer
    shell source命令说明
  • 原文地址:https://www.cnblogs.com/hikoukay/p/11651980.html
Copyright © 2011-2022 走看看