mybatisGeneratorConfig.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE generatorConfiguration PUBLIC
  3. "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
  4. "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
  5. <generatorConfiguration>
  6. <!-- !!!! Driver Class Path !!!! -->
  7. <classPathEntry location="E:/centerck/repository/mysql/mysql-connector-java/5.1.40/mysql-connector-java-5.1.40.jar" />
  8. <context id="context" targetRuntime="MyBatis3">
  9. <commentGenerator>
  10. <!-- !!!! 不生成注释 !!!! -->
  11. <property name="suppressAllComments" value="true" />
  12. <property name="suppressDate" value="true" />
  13. </commentGenerator>
  14. <!-- !!!! Database Configurations !!!! -->
  15. <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://192.168.70.88:3308/xczg_developer" userId="root" password="xczgdeveloper" />
  16. <javaTypeResolver>
  17. <property name="forceBigDecimals" value="false" />
  18. </javaTypeResolver>
  19. <!-- !!!! Model Configurations !!!! -->
  20. <javaModelGenerator targetPackage="com.xczg.micro.entity" targetProject="src/main/java">
  21. <property name="enableSubPackages" value="false" />
  22. <property name="trimStrings" value="true" />
  23. </javaModelGenerator>
  24. <!-- !!!! Mapper XML Configurations !!!! -->
  25. <sqlMapGenerator targetPackage="com.xczg.micro.mapper" targetProject="src/main/java">
  26. <property name="enableSubPackages" value="false" />
  27. </sqlMapGenerator>
  28. <!-- !!!! Mapper Interface Configurations !!!! -->
  29. <javaClientGenerator targetPackage="com.xczg.micro.mapper" targetProject="src/main/java" type="XMLMAPPER">
  30. <property name="enableSubPackages" value="false" />
  31. </javaClientGenerator>
  32. <!-- !!!! Table Configurations !!!! -->
  33. <table tableName="document_type"
  34. enableInsert="true"
  35. enableCountByExample="false"
  36. enableDeleteByExample="false" enableDeleteByPrimaryKey="true"
  37. enableUpdateByExample="false" enableUpdateByPrimaryKey="true"
  38. enableSelectByExample="false" enableSelectByPrimaryKey="true">
  39. <!--<generatedKey column="id" sqlStatement="select sys_role_seq.nextval from dual"/>-->
  40. <!--<columnOverride column="CREATE_TIME" jdbcType="TIMESTAMP" />-->
  41. <!--<columnOverride column="UPDATE_TIME" jdbcType="TIMESTAMP" />-->
  42. <!--默认是Date类型(年月日),如果需要时间戳类型需要自定义-->
  43. </table>
  44. </context>
  45. </generatorConfiguration>