generatorConfig.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>
    <!-- oracle lib location -->
    <classPathEntry location="D:\repository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar" />
    <context id="DB2Tables" targetRuntime="MyBatis3">
        <commentGenerator>
            <property name="suppressAllComments" value="true" />
        </commentGenerator>
        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
            connectionURL="jdbc:mysql://127.0.0.1:3306/test" userId="root"
            password="123456">
        </jdbcConnection>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false" />
        </javaTypeResolver>
        
        
        <!-- model package and location -->
        <javaModelGenerator targetPackage="com.saas.basic.model" targetProject="basic-data\src\main\java">
            <property name="enableSubPackages" value="true" />
            <property name="trimStrings" value="true" />
        </javaModelGenerator>
        <!-- mapping package and location 此处的targetPackage的值是resource下的文件件,即xml存放位置-->
        <sqlMapGenerator targetPackage="mapper" targetProject="basic-data\src\main\resources">
            <property name="enableSubPackages" value="true" />
        </sqlMapGenerator>
        <!-- dao package and location -->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.saas.basic.mapper" targetProject="basic-data\src\main\java">
            <property name="enableSubPackages" value="true" />
        </javaClientGenerator>
        
        
        <!-- <table tableName="fault_code_info" domainObjectName="FaultCodeInfo"
            enableCountByExample="false" enableUpdateByExample="false"
            enableDeleteByExample="false" enableSelectByExample="false"
            selectByExampleQueryId="false" /> -->
            
          <!-- <table tableName="fault_handling_mode" domainObjectName="FaultHandlingMode"
             enableCountByExample="false" enableUpdateByExample="false"
             enableDeleteByExample="false" enableSelectByExample="false"
             selectByExampleQueryId="false" /> -->
        <table tableName="device_type" domainObjectName="AAAA"
             enableCountByExample="false" enableUpdateByExample="false"
             enableDeleteByExample="false" enableSelectByExample="false"
             selectByExampleQueryId="false" />
            
    </context>
</generatorConfiguration>

 

相关文章:

  • 2021-07-31
  • 2021-06-20
  • 2021-07-06
  • 2021-09-09
  • 2022-12-23
  • 2022-01-03
  • 2021-12-22
  • 2022-02-17
猜你喜欢
  • 2021-11-26
  • 2021-12-20
  • 2021-12-30
  • 2021-07-21
  • 2021-08-24
  • 2021-09-13
相关资源
相似解决方案