• mybatis代码自动生成插件


    一、导包

    1. <plugin>
    2. <groupId>org.mybatis.generatorgroupId>
    3. <artifactId>mybatis-generator-maven-pluginartifactId>
    4. <version>1.3.6version>
    5. <configuration>
    6. <configurationFile>GeneratorMapper.xmlconfigurationFile>
    7. <verbose>trueverbose>
    8. <overwrite>trueoverwrite>
    9. configuration>
    10. plugin>

    二、GeneratorMapper.xml 

    1. "1.0" encoding="UTF-8"?>
    2. generatorConfiguration
    3. PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
    4. "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
    5. <generatorConfiguration>
    6. <classPathEntry location="E:\mysql-connector-java-5.1.38.jar"/>
    7. <context id="tables" targetRuntime="MyBatis3">
    8. <commentGenerator>
    9. <property name="suppressAllComments" value="true" />
    10. commentGenerator>
    11. <jdbcConnection driverClass="com.mysql.jdbc.Driver"
    12. connectionURL="jdbc:mysql://192.168.88.130:3306/p2p"
    13. userId="root"
    14. password="root">
    15. jdbcConnection>
    16. <javaModelGenerator targetPackage="com.abc.p2p.model"
    17. targetProject="E:\course\035-p2p-SpringBoot\000-IDEA-projects\001-P2P-IDEA-SpringBoot\003-p2p-exterface\src\main\java">
    18. <property name="enableSubPackages" value="false" />
    19. <property name="trimStrings" value="false" />
    20. javaModelGenerator>
    21. <sqlMapGenerator targetPackage="com.abc.p2p.mapper" targetProject="src/main/java">
    22. <property name="enableSubPackages" value="false" />
    23. sqlMapGenerator>
    24. <javaClientGenerator type="XMLMAPPER" targetPackage="com.abc.p2p.mapper" targetProject="src/main/java">
    25. <property name="enableSubPackages" value="false" />
    26. javaClientGenerator>
    27. <table tableName="b_loan_info" domainObjectName="LoanInfo"
    28. enableCountByExample="false"
    29. enableUpdateByExample="false"
    30. enableDeleteByExample="false"
    31. enableSelectByExample="false"
    32. selectByExampleQueryId="false"/>
    33. <table tableName="b_bid_info" domainObjectName="BidInfo"
    34. enableCountByExample="false"
    35. enableUpdateByExample="false"
    36. enableDeleteByExample="false"
    37. enableSelectByExample="false"
    38. selectByExampleQueryId="false"/>
    39. <table tableName="b_income_record" domainObjectName="IncomeRecord"
    40. enableCountByExample="false"
    41. enableUpdateByExample="false"
    42. enableDeleteByExample="false"
    43. enableSelectByExample="false"
    44. selectByExampleQueryId="false"/>
    45. <table tableName="b_recharge_record" domainObjectName="RechargeRecord"
    46. enableCountByExample="false"
    47. enableUpdateByExample="false"
    48. enableDeleteByExample="false"
    49. enableSelectByExample="false"
    50. selectByExampleQueryId="false"/>
    51. <table tableName="u_user" domainObjectName="User"
    52. enableCountByExample="false"
    53. enableUpdateByExample="false"
    54. enableDeleteByExample="false"
    55. enableSelectByExample="false"
    56. selectByExampleQueryId="false"/>
    57. <table tableName="u_finance_account" domainObjectName="FinanceAccount"
    58. enableCountByExample="false"
    59. enableUpdateByExample="false"
    60. enableDeleteByExample="false"
    61. enableSelectByExample="false"
    62. selectByExampleQueryId="false"/>
    63. context>
    64. generatorConfiguration>

  • 相关阅读:
    LeetCode——最大子数组和(中等)
    ZYNQ_FPGA_SPI通信协议多种实现方式
    《Kubernetes部署篇:Ubuntu20.04基于外部etcd+部署kubernetes1.25.14集群(多主多从)》
    软件测试,作为职场新鸟?我该怎么办?看看资深5年测试的见解......
    [附源码]java毕业设计宾馆客房管理系统
    RecId
    gateway网关转发请求到nacos不同namespace和不同group下服务实例源码改造
    项目实战:修改水果库存系统特定库存记录
    手撕前端javascript面试题---快速排序 | 全排列 | instanceof
    tf.compat.v1.global_variables()
  • 原文地址:https://blog.csdn.net/m0_58961367/article/details/134517590