generatorConfig.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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="MysqlContext" targetRuntime="MyBatis3Simple" defaultModelType="flat">
  7. <property name="beginningDelimiter" value="`"/>
  8. <property name="endingDelimiter" value="`"/>
  9. <!-- suppressDate是去掉生成日期那行注释,suppressAllComments是去掉所有的注解 -->
  10. <commentGenerator>
  11. <property name="suppressDate" value="true"/>
  12. <property name="suppressAllComments" value="true" />
  13. </commentGenerator>
  14. <jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
  15. connectionURL="jdbc:mysql://localhost:3306/courselearning?useUnicode=true&amp;characterEncoding=UTF-8&amp;userSSL=false&amp;serverTimezone=GMT%2B8"
  16. userId="root"
  17. password="123456">
  18. </jdbcConnection>
  19. <!--生成model类的存放位置 -->
  20. <javaModelGenerator targetPackage="cn.seecoder.courselearning.po" targetProject="src/main/java">
  21. <property name="enableSubPackages" value="true"/>
  22. <property name="trimStrings" value="true"/>
  23. </javaModelGenerator>
  24. <!-- 生成映射文件的存放位置 -->
  25. <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
  26. <property name="enableSubPackages" value="true"/>
  27. </sqlMapGenerator>
  28. <!-- 生成Dao类的存放位置-->
  29. <javaClientGenerator type="XMLMAPPER" targetPackage="cn.seecoder.courselearning.mapperservice" targetProject="src/main/java">
  30. <property name="enableSubPackages" value="true"/>
  31. </javaClientGenerator>
  32. <!-- 生成对应的表及类名 -->
  33. <!-- <table tableName="course" domainObjectName="Course" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
  34. <!-- <table tableName="course_ware" domainObjectName="CourseWare" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
  35. <!-- <table tableName="user_info" domainObjectName="User" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
  36. <table tableName="recharge_order" domainObjectName="RechargeOrder" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
  37. <!-- <table tableName="course_order" domainObjectName="CourseOrder" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
  38. </context>
  39. </generatorConfiguration>