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
  • 相关阅读:
    函数对象
    函数的基本使用
    文件处理
    字符编码
    基本数据类型及内置方法二
    流程控制(if while for)
    Django中ajax的基本用法
    CBV之Django中View类部分源码分析
    前端基础之BOM和DOM
    css基础
  • 原文地址:https://www.cnblogs.com/hikoukay/p/11651980.html
Copyright © 2011-2022 走看看