generatorConfig.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
  3. "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
  4. <generatorConfiguration>
  5. <!--mysql 连接数据库jar 这里选择自己本地位置-->
  6. <!-- <classPathEntry location="./lib/postgresql-42.3.4.jar"/>-->
  7. <classPathEntry location=".\lib\mysql-connector-java-5.1.46.jar"/>
  8. <context id="testTables" targetRuntime="MyBatis3">
  9. <!-- 运行环境配置 -->
  10. <!--<plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>-->
  11. <commentGenerator>
  12. <!-- 是否去除自动生成的注释 true:是 : false:否 -->
  13. <property name="suppressAllComments" value="true"/>
  14. <!-- 数据库注释支持 -->
  15. <property name="addRemarkComments" value="true"/>
  16. <!-- 时间格式设置 -->
  17. <property name="dateFormat" value="yyyy-MM-dd HH:mm:ss"/>
  18. </commentGenerator>
  19. <!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
  20. <jdbcConnection driverClass="com.mysql.jdbc.Driver"
  21. connectionURL="jdbc:mysql://office.bowintek.com:3306/smartSearchDB?useSSL=false" userId="root"
  22. password="bowin123"/>
  23. <!-- <jdbcConnection driverClass="org.postgresql.Driver"
  24. connectionURL="jdbc:postgresql://office.bowintek.com:5432/postgres"
  25. userId="postgres"
  26. password="bowin123">
  27. </jdbcConnection>-->
  28. <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
  29. NUMERIC 类型解析为java.math.BigDecimal -->
  30. <javaTypeResolver>
  31. <property name="forceBigDecimals" value="false"/>
  32. </javaTypeResolver>
  33. <!-- targetProject:生成PO类的位置 -->
  34. <javaModelGenerator targetPackage="com.bowintek.practice.model"
  35. targetProject="src/main/java">
  36. <!-- enableSubPackages:是否让schema作为包的后缀 -->
  37. <property name="enableSubPackages" value="false"/>
  38. <!-- 从数据库返回的值被清理前后的空格 -->
  39. <property name="trimStrings" value="true"/>
  40. </javaModelGenerator>
  41. <!-- targetProject:mapper映射文件生成的位置
  42. 如果maven工程只是单独的一个工程,targetProject="src/main/java"
  43. 若果maven工程是分模块的工程,targetProject="所属模块的名称",例如:
  44. targetProject="ecps-manager-mapper",下同-->
  45. <sqlMapGenerator targetPackage="mapping"
  46. targetProject="src/main/resources">
  47. <!-- enableSubPackages:是否让schema作为包的后缀 -->
  48. <property name="enableSubPackages" value="false"/>
  49. </sqlMapGenerator>
  50. <!-- targetPackage:mapper接口生成的位置 -->
  51. <javaClientGenerator type="XMLMAPPER"
  52. targetPackage="com.bowintek.practice.mapper"
  53. targetProject="src/main/java">
  54. <!-- enableSubPackages:是否让schema作为包的后缀 -->
  55. <property name="enableSubPackages" value="false"/>
  56. </javaClientGenerator>
  57. <!-- 指定数据库表 -->
  58. <!--<table schema="" tableName="cf_college"><property name="useActualColumnNames" value="true"/></table>
  59. <table schema="" tableName="cf_major"><property name="useActualColumnNames" value="true"/></table>
  60. <table schema="" tableName="cf_major_class"><property name="useActualColumnNames" value="true"/></table>
  61. <table schema="" tableName="cf_major_grade"><property name="useActualColumnNames" value="true"/></table>
  62. <table schema="" tableName="cf_schoolyear"><property name="useActualColumnNames" value="true"/></table>
  63. <table schema="" tableName="sys_announcement"><property name="useActualColumnNames" value="true"/></table>
  64. <table schema="" tableName="sys_announcement_sys_role"><property name="useActualColumnNames" value="true"/></table>
  65. <table schema="" tableName="sys_announcement_sys_user"><property name="useActualColumnNames" value="true"/></table>
  66. <table schema="" tableName="sys_dictionary"><property name="useActualColumnNames" value="true"/></table>
  67. <table schema="" tableName="sys_dictionary_item"><property name="useActualColumnNames" value="true"/></table>
  68. <table schema="" tableName="sys_function_code"><property name="useActualColumnNames" value="true"/></table>
  69. <table schema="" tableName="sys_menu"><property name="useActualColumnNames" value="true"/></table>
  70. <table schema="" tableName="sys_role"><property name="useActualColumnNames" value="true"/></table>
  71. <table schema="" tableName="sys_role_datarange"><property name="useActualColumnNames" value="true"/></table>
  72. <table schema="" tableName="sys_role_sys_function_code"><property name="useActualColumnNames" value="true"/></table>
  73. <table schema="" tableName="sys_user"><property name="useActualColumnNames" value="true"/></table>
  74. <table schema="" tableName="sys_user_cf_college"><property name="useActualColumnNames" value="true"/></table>
  75. <table schema="" tableName="sys_user_cf_major"><property name="useActualColumnNames" value="true"/></table>
  76. <table schema="" tableName="sys_user_cf_major_class"><property name="useActualColumnNames" value="true"/></table>
  77. <table schema="" tableName="sys_user_cf_major_grade"><property name="useActualColumnNames" value="true"/></table>
  78. <table schema="" tableName="sys_user_datarange"><property name="useActualColumnNames" value="true"/></table>
  79. <table schema="" tableName="sys_user_sys_role"><property name="useActualColumnNames" value="true"/></table>
  80. <table schema="" tableName="pl_practice_plan"><property name="useActualColumnNames" value="true"/></table>
  81. <table schema="" tableName="pl_practice_plan_major"><property name="useActualColumnNames" value="true"/></table>
  82. <table schema="" tableName="pr_daily_report">
  83. <table schema="" tableName="cf_device"><property name="useActualColumnNames" value="true"/></table>
  84. <table schema="" tableName="pl_practice_plan_major"><property name="useActualColumnNames" value="true"/></table><table schema="" tableName="pr_daily_report">
  85. <property name="useActualColumnNames" value="true"/>
  86. <columnOverride column="Content" javaType="java.lang.String" jdbcType="VARCHAR" />
  87. <columnOverride column="Comment" javaType="java.lang.String" jdbcType="VARCHAR" />
  88. </table>
  89. <table schema="" tableName="pr_weekly_report">
  90. <property name="useActualColumnNames" value="true"/>
  91. <columnOverride column="Content" javaType="java.lang.String" jdbcType="VARCHAR" />
  92. <columnOverride column="Comment" javaType="java.lang.String" jdbcType="VARCHAR" />
  93. </table>
  94. <table schema="" tableName="pr_monthly_report">
  95. <property name="useActualColumnNames" value="true"/>
  96. <columnOverride column="Content" javaType="java.lang.String" jdbcType="VARCHAR" />
  97. <columnOverride column="Comment" javaType="java.lang.String" jdbcType="VARCHAR" />
  98. </table>
  99. <table schema="" tableName="pr_practice_report">
  100. <property name="useActualColumnNames" value="true"/>
  101. <columnOverride column="Content" javaType="java.lang.String" jdbcType="VARCHAR" />
  102. <columnOverride column="Comment" javaType="java.lang.String" jdbcType="VARCHAR" />
  103. <columnOverride column="CompanyComment" javaType="java.lang.String" jdbcType="VARCHAR" />
  104. </table>
  105. -->
  106. <!--<table schema="" tableName="cf_position"><property name="useActualColumnNames" value="true"/>
  107. <columnOverride column="Remark" javaType="java.lang.String" jdbcType="VARCHAR" />
  108. </table>
  109. -->
  110. <!-- <table schema="" tableName="sys_announcement"><property name="useActualColumnNames" value="true"/>-->
  111. <!-- <columnOverride column="content" javaType="java.lang.String" jdbcType="VARCHAR" />-->
  112. <!-- </table>-->
  113. <!--<table schema="" tableName="cf_major"><property name="useActualColumnNames" value="true"/>
  114. <columnOverride column="StandardMajorID" javaType="java.lang.Integer" jdbcType="INTEGER" />
  115. <table schema="" tableName="Sys_Log"><property name="useActualColumnNames" value="true"/></table>
  116. </table>-->
  117. <table schema="" tableName="wl_user_expend_setting"><property name="useActualColumnNames" value="true"/></table>
  118. </context>
  119. </generatorConfiguration>