generatorConfig.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE 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. <context id="testTables" targetRuntime="MyBatis3">
  7. <!-- 生成注释时,必须加type="MyCommentGenerator" -->
  8. <commentGenerator type="com.chinaitop.depot.storage.utils.MyCommentGenerator">
  9. <!-- 是否去除自动生成的注释 true:是 : false:否 -->
  10. <property name="suppressAllComments" value="false" />
  11. </commentGenerator>
  12. <!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
  13. <jdbcConnection
  14. driverClass="com.gbasedbt.jdbc.IfxDriver"
  15. connectionURL="jdbc:gbasedbt-sqli://101.36.160.140:19089/depot:INFORMIXSERVER=ol_gbasedbt1210;NEWCODESET=GB18030,GB18030-2000,5488;DB_LOCALE=zh_cn.GB18030-2000;GL_USEGLU=1;IFX_USE_STRENC=true;characterEncoding=utf8;"
  16. userId="gbasedbt"
  17. password="cDbK2S0go8">
  18. </jdbcConnection>
  19. <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
  20. NUMERIC 类型解析为java.math.BigDecimal -->
  21. <javaTypeResolver>
  22. <property name="forceBigDecimals" value="false" />
  23. </javaTypeResolver>
  24. <!-- targetProject:生成PO类的位置 -->
  25. <javaModelGenerator targetPackage="com.chinaitop.depot.storage.model"
  26. targetProject=".\src\main\java">
  27. <!-- enableSubPackages:是否让schema作为包的后缀 -->
  28. <property name="enableSubPackages" value="false" />
  29. <!-- 从数据库返回的值被清理前后的空格 -->
  30. <property name="trimStrings" value="true" />
  31. </javaModelGenerator>
  32. <!-- targetProject:mapper映射文件生成的位置 -->
  33. <sqlMapGenerator targetPackage="com.chinaitop.depot.storage.mapper"
  34. targetProject=".\src\main\java">
  35. <!-- enableSubPackages:是否让schema作为包的后缀 -->
  36. <property name="enableSubPackages" value="false" />
  37. </sqlMapGenerator>
  38. <!-- targetPackage:mapper接口生成的位置 -->
  39. <javaClientGenerator type="XMLMAPPER"
  40. targetPackage="com.chinaitop.depot.storage.mapper"
  41. targetProject=".\src\main\java">
  42. <!-- enableSubPackages:是否让schema作为包的后缀 -->
  43. <property name="enableSubPackages" value="false" />
  44. </javaClientGenerator>
  45. <!-- 指定要反向生成的数据库表 -->
  46. <!-- <table schema="" tableName="storage_qualitystandard_main"></table> -->
  47. <table schema="" tableName="storage_qualitystandard_preparation"></table>
  48. </context>
  49. </generatorConfiguration>