generatorConfig.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. <!--
  5. 使用说明:
  6. 1.修改location保证能加载到对应的Jar包
  7. 2.修改targetProject保证能找到对应路径
  8. 3.修改表配置添加需要生成的表
  9. 4.注意Table标签schema要填数据库用户
  10. 5.执行com.chinacoal.utils.mybatis包下的GenMyBatis类
  11. -->
  12. <!-- 数据库驱动包位置 -->
  13. <!-- <classPathEntry location="D:\idea-maven\ecif_repository\repository\com\oracle\ojdbc14\6\ojdbc14-6.jar" />-->
  14. <classPathEntry location="D:\mvn_repository\mysql\mysql-connector-java\8.0.25\mysql-connector-java-8.0.25.jar" />
  15. <context id="mybatisgen" targetRuntime="MyBatis3">
  16. <!-- 指定生成的java文件的编码,没有直接生成到项目时中文可能会乱码 -->
  17. <property name="javaFileEncoding" value="UTF-8"/>
  18. <!-- 这里的type里写的是你的实现类的类全路径 -->
  19. <commentGenerator type="com.ydtech.utils.genMybatis.MyBatisComments">
  20. <!-- 是否去除自动生成的注释 true:是 : false:否 -->
  21. <property name="suppressAllComments" value="false" />
  22. <property name="suppressDate" value="false" />
  23. </commentGenerator>
  24. <!-- 数据库链接 -->
  25. <!-- <jdbcConnection-->
  26. <!-- driverClass="oracle.jdbc.driver.OracleDriver"-->
  27. <!-- connectionURL="jdbc:oracle:thin:@10.1.32.153:1521:signtest"-->
  28. <!-- userId="zmsign"-->
  29. <!-- password="zmsign#2020">-->
  30. <!-- &lt;!&ndash; 针对oracle数据库 &ndash;&gt;-->
  31. <!-- <property name="remarksReporting" value="true"></property>-->
  32. <!-- &lt;!&ndash; 针对mysql数据库 &ndash;&gt;-->
  33. <!-- &lt;!&ndash;<property name="useInformationSchema" value="true"></property>&ndash;&gt;-->
  34. <!-- </jdbcConnection>-->
  35. <jdbcConnection
  36. driverClass="com.mysql.cj.jdbc.Driver"
  37. connectionURL="jdbc:mysql://10.1.4.69:3306/insagent?serverTimezone=Asia/Shanghai&amp;allowMultiQueries=true&amp;useUnicode=true&amp;characterEncoding=UTF-8"
  38. userId="root"
  39. password="123456">
  40. <!-- 针对oracle数据库 -->
  41. <!-- <property name="remarksReporting" value="true"></property>-->
  42. <!-- 针对mysql数据库 -->
  43. <property name="useInformationSchema" value="true"></property>
  44. </jdbcConnection>
  45. <!-- 类型转换 -->
  46. <javaTypeResolver>
  47. <property name="forceBigDecimals" value="false" />
  48. </javaTypeResolver>
  49. <!-- pojo -->
  50. <javaModelGenerator targetPackage="com.ydtech.modules.fnc.model" targetProject="D:\person\zgdd\insagent\src\main\java">
  51. <property name="enableSubPackages" value="false" />
  52. <property name="trimStrings" value="false" />
  53. </javaModelGenerator>
  54. <!-- xml -->
  55. <sqlMapGenerator targetPackage="mapper.modules.fnc" targetProject="D:\person\zgdd\insagent\src\main\resources">
  56. <property name="enableSubPackages" value="true" />
  57. </sqlMapGenerator>
  58. <!-- mapper -->
  59. <javaClientGenerator type="XMLMAPPER" targetPackage="com.ydtech.modules.fnc.dao" targetProject="D:\person\zgdd\insagent\src\main\java">
  60. <property name="enableSubPackages" value="false" />
  61. </javaClientGenerator>
  62. <!-- 表配置 -->
  63. <table tableName="fnc_vou_business" schema=""
  64. enableCountByExample="true"
  65. enableUpdateByExample="true"
  66. enableDeleteByExample="true"
  67. enableSelectByExample="true"
  68. selectByExampleQueryId="true">
  69. </table>
  70. </context>
  71. </generatorConfiguration>