`
godsend_jin
  • 浏览: 40039 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

一款自动生成mybatis dto、dao、config的工具

阅读更多

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE generatorConfiguration

  PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"

  "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">

<generatorConfiguration>

 

<!-- 使用的数据库连接jar -->

<classPathEntrylocation="mysql-connector-java-5.1.6.jar"/>

<context id="DB2Tables"targetRuntime="MyBatis3">

<commentGenerator>

<property name="suppressDate" value="true"/>

 

<property name="suppressAllComments" value="true"/>

</commentGenerator>

 

<!-- 这里配置连接数据库 -->

<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://10.6.222.59:3307/fpsapdb" userId="fpsap" password="fpsap123">

</jdbcConnection>

<javaTypeResolver>

<property name="forceBigDecimals" value="false"/>

</javaTypeResolver>

 

<!-- 配置要生成的DTO的目录 -->

<javaModelGenerator targetPackage="cn.webank.cnc.of.model" targetProject="src">

<property name="enableSubPackages" value="true"/>

<property name="trimStrings" value="true"/>

</javaModelGenerator>

 

<!-- 配置要生成的mapping config的目录 -->

<sqlMapGenerator targetPackage="cn.webank.cnc.of.mapping" targetProject="src">

<property name="enableSubPackages" value="true"/>

</sqlMapGenerator>

 

<!-- 配置要生成的DAO的目录 -->

<javaClientGenerator type="XMLMAPPER" targetPackage="cn.webank.cnc.of.mybatis.dao" targetProject="src">

<property name="enableSubPackages" value="true"/>

</javaClientGenerator>

 

<!-- 配置要生成的表明以及对应的DTO名称 -->

<table tableName="SUBJECT_RELATION" domainObjectName="SubjectRelation" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>

 

</context>

</generatorConfiguration>

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics