generatorConfig.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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="mssql-jdbc-8.2.0.jre8.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://localhost:3306/ssm_test" userId="root" password="root">
  16. </jdbcConnection> -->
  17. <jdbcConnection driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
  18. connectionURL="jdbc:sqlserver://219.128.77.86:1433; DatabaseName=qywechattest" userId="test" password="360ljtest!">
  19. </jdbcConnection>
  20. <javaTypeResolver>
  21. <property name="forceBigDecimals" value="false"/>
  22. </javaTypeResolver>
  23. <!-- 生成模型的包名和位置-->
  24. <javaModelGenerator targetPackage="com.liangjian11.wx.mp.modle" targetProject="src">
  25. <property name="enableSubPackages" value="true"/>
  26. <property name="trimStrings" value="true"/>
  27. </javaModelGenerator>
  28. <!-- 生成映射文件的包名和位置-->
  29. <sqlMapGenerator targetPackage="mapper" targetProject="src">
  30. <property name="enableSubPackages" value="true"/>
  31. </sqlMapGenerator>
  32. <!-- 生成DAO的包名和位置-->
  33. <javaClientGenerator type="XMLMAPPER" targetPackage="com.liangjian11.wx.mp.mapper" targetProject="src">
  34. <property name="enableSubPackages" value="true"/>
  35. </javaClientGenerator>
  36. <!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
  37. <table tableName="userAppPortAccessLog"
  38. domainObjectName="UserAppPortAccessLog" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
  39. selectByExampleQueryId="false" >
  40. <property name="useActualColumnNames" value="true" />
  41. </table>
  42. </context>
  43. </generatorConfiguration>