GeneratorConfig.xml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
  3. <generatorConfiguration>
  4. <classPathEntry location="C:\Users\Administrator.SC-202009251130\AppData\Roaming\DBeaverData\drivers\maven\maven-central\mysql\mysql-connector-java-5.1.39.jar" />
  5. <!-- <classPathEntry location="C:\Users\Administrator.SC-202009251130\AppData\Roaming\DBeaverData\drivers\maven\maven-central\mysql\mysql-connector-java-8.0.17.jar" /> /> -->
  6. <context id="MysqlTables" targetRuntime="MyBatis3" defaultModelType="flat">
  7. <!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
  8. <property name="autoDelimitKeywords" value="true"/>
  9. <!-- 生成的Java文件的编码 -->
  10. <property name="javaFileEncoding" value="utf-8"/>
  11. <!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
  12. <property name="beginningDelimiter" value="`"/>
  13. <property name="endingDelimiter" value="`"/>
  14. <!-- 格式化XML代码 -->
  15. <property name="xmlFormatter" value="org.mybatis.generator.api.dom.DefaultXmlFormatter"/>
  16. <plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
  17. <plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
  18. <!-- 注释 -->
  19. <commentGenerator>
  20. <property name="suppressAllComments" value="false"/><!-- 是否取消注释 -->
  21. <property name="suppressDate" value="false"/> <!-- 是否生成注释代时间戳-->
  22. </commentGenerator>
  23. <jdbcConnection connectionURL="jdbc:mysql://localhost:3306/aft_ow?serverTimezone=UTC&amp;useSSL=true"
  24. driverClass="com.mysql.cj.jdbc.Driver" password="123456" userId="root" >
  25. <!-- 防止生成其它库的表 -->
  26. <property name="nullCatalogMeansCurrent" value="true"/>
  27. </jdbcConnection>
  28. <!-- 类型转换 -->
  29. <javaTypeResolver>
  30. <!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
  31. <property name="forceBigDecimals" value="false"/>
  32. </javaTypeResolver>
  33. <javaModelGenerator targetPackage="com.kede.common.model" targetProject="kede-web-hn" >
  34. <!-- 是否让schema作为包的后缀 -->
  35. <property name="enableSubPackages" value="false"/>
  36. <!-- 从数据库返回的值去掉前后空格 -->
  37. <property name="trimStrings" value="true"/>
  38. </javaModelGenerator>
  39. <sqlMapGenerator targetPackage="com.kede.common.mapper" targetProject="kede-web-hn" >
  40. <property name="enableSubPackages" value="false"/>
  41. </sqlMapGenerator>
  42. <javaClientGenerator targetPackage="com.kede.common.dao" type="XMLMAPPER" targetProject="kede-web-hn" >
  43. <property name="enableSubPackages" value="false"/>
  44. <property name="nullCatalogMeansCurrent" value="true"/>
  45. </javaClientGenerator>
  46. <table schema="aft_ow" tableName="project" enableCountByExample="false"
  47. enableUpdateByExample="false"
  48. enableDeleteByExample="false"
  49. enableSelectByExample="false"
  50. selectByExampleQueryId="false"
  51. enableSelectByPrimaryKey="true"
  52. enableUpdateByPrimaryKey="true"
  53. enableDeleteByPrimaryKey="true"
  54. >
  55. <property name="useActualColumnNames" value="false"/>
  56. </table>
  57. </context>
  58. </generatorConfiguration>