• 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>

  • 相关阅读:
    arudino 知识整理
    Ubuntu 22.04 MySQL安装并设置远程访问
    umi-request请求适配服务端返回400时拿不到返回错误消息
    机器学习笔记之高斯混合模型(二)模型求解——尝试使用极大似然估计求解模型参数
    Private market:借助ZK实现的任意计算的trustless交易
    ref和reactive的区别?
    在CentOS编译Git源码
    判断回文数
    QT-day1
    Python实现定时任务的八种方式
  • 原文地址:https://blog.csdn.net/m0_58961367/article/details/134517590