generatorConfig.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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="E:\Java\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar"/>
  8. <!--<classPathEntry location="D:\Users\sqljdbc_6.0.8112.200_chs\sqljdbc_6.0\chs\jre7\sqljdbc41.jar" />-->
  9. <context id="DB2Tables" targetRuntime="MyBatis3">
  10. <commentGenerator>
  11. <property name="suppressDate" value="true"/>
  12. <!-- 是否去除自动生成的注释 true:是 : false:否 -->
  13. <property name="suppressAllComments" value="true"/>
  14. </commentGenerator>
  15. <!--数据库链接URL,用户名、密码 -->
  16. <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://120.27.0.230:3306/topproemr?characterEncoding=utf8" userId="root" password="123456">
  17. </jdbcConnection>
  18. <!-- <jdbcConnection driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
  19. connectionURL="jdbc:sqlserver://120.27.0.230:1433;DatabaseName=HealthCare"
  20. userId="sa"
  21. password="Zjhis87357900" />-->
  22. <javaTypeResolver>
  23. <property name="forceBigDecimals" value="false"/>
  24. </javaTypeResolver>
  25. <!-- 生成模型的包名和位置-->
  26. <!-- -->
  27. <javaModelGenerator targetPackage="com.xinxin.topro.pubservice.mysqlModel" targetProject="src/main/java">
  28. <property name="enableSubPackages" value="true"/>
  29. <property name="trimStrings" value="true"/>
  30. </javaModelGenerator>
  31. <!-- <javaModelGenerator targetPackage="com.xinxin.topro.base.sqlservermodel" targetProject="src/main/java">
  32. <property name="enableSubPackages" value="true"/>
  33. <property name="trimStrings" value="true"/>
  34. </javaModelGenerator>-->
  35. <!-- 生成映射文件的包名和位置-->
  36. <sqlMapGenerator targetPackage="resources.mapper.mysqlmapper" targetProject="src/main">
  37. <property name="enableSubPackages" value="true"/>
  38. </sqlMapGenerator>
  39. <!-- 生成DAO的包名和位置-->
  40. <javaClientGenerator type="XMLMAPPER" targetPackage="com.xinxin.topro.pubservice.mysqlmapper" targetProject="src/main/java">
  41. <property name="enableSubPackages" value="true"/>
  42. </javaClientGenerator>
  43. <!-- <javaClientGenerator type="XMLMAPPER" targetPackage="com.xinxin.topro.base.sqlservermapper" targetProject="src/main/java">
  44. <property name="enableSubPackages" value="true"/>
  45. </javaClientGenerator>-->
  46. <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
  47. <table tableName="inp_mypatient" domainObjectName="InpMyPatient"
  48. enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false">
  49. </table>
  50. </context>
  51. </generatorConfiguration>