generatorConfigOnlineexamSystem.xml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. <!-- 数据库驱动-->
  7. <classPathEntry location="D:\mybatis-generator\mysql-connector-java-5.1.30.jar"/>
  8. <context id="DB2Tables" targetRuntime="MyBatis3">
  9. <commentGenerator>
  10. <property name="suppressDate" value="true"/>
  11. <!-- 是否去除自动生成的注释 true:是 : false:否 -->
  12. <property name="suppressAllComments" value="true"/>
  13. </commentGenerator>
  14. <!--数据库链接URL,用户名、密码 -->
  15. <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://127.0.0.1:3306/onlineexam_system" userId="root" password="123456">
  16. </jdbcConnection>
  17. <javaTypeResolver>
  18. <property name="forceBigDecimals" value="false"/>
  19. </javaTypeResolver>
  20. <!-- 生成模型的包名和位置-->
  21. <javaModelGenerator targetPackage="com.mwt.oes.domain" targetProject="D:\onlineexam-system-backend\src\main\java">
  22. <property name="enableSubPackages" value="true"/>
  23. <property name="trimStrings" value="true"/>
  24. </javaModelGenerator>
  25. <!-- 生成映射文件的包名和位置-->
  26. <sqlMapGenerator targetPackage="mapper" targetProject="D:\onlineexam-system-backend\src\main\resources">
  27. <property name="enableSubPackages" value="true"/>
  28. </sqlMapGenerator>
  29. <!-- 生成DAO的包名和位置-->
  30. <javaClientGenerator type="XMLMAPPER" targetPackage="com.mwt.oes.dao" targetProject="D:\onlineexam-system-backend\src\main\java">
  31. <property name="enableSubPackages" value="true"/>
  32. </javaClientGenerator>
  33. <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
  34. <table tableName="admin" domainObjectName="Admin"></table>
  35. <table tableName="bank_fill_que" domainObjectName="BankFillQue"></table>
  36. <table tableName="bank_judge_que" domainObjectName="BankJudgeQue"></table>
  37. <table tableName="bank_multiple_choice_que" domainObjectName="BankMultipleChoiceQue"></table>
  38. <table tableName="bank_single_choice_que" domainObjectName="BankSingleChoiceQue"></table>
  39. <table tableName="paper" domainObjectName="Paper"></table>
  40. <table tableName="paper_que" domainObjectName="PaperQue"></table>
  41. <table tableName="programing_language" domainObjectName="ProgramingLanguage"></table>
  42. <table tableName="student" domainObjectName="Student"></table>
  43. <table tableName="student_feedback" domainObjectName="StudentFeedback"></table>
  44. <table tableName="student_home_rotation_img" domainObjectName="StudentHomeRotationImg"></table>
  45. <table tableName="student_paper_answer" domainObjectName="StudentPaperAnswer"></table>
  46. <table tableName="student_paper_score" domainObjectName="StudentPaperScore"></table>
  47. <table tableName="teacher" domainObjectName="Teacher"></table>
  48. <table tableName="teacher_notice" domainObjectName="TeacherNotice"></table>
  49. </context>
  50. </generatorConfiguration>