Created
April 2, 2015 08:30
-
-
Save user20161119/f7e5d69b66834c105cff to your computer and use it in GitHub Desktop.
Mybatis Generator Config xml file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> | |
<properties resource="util/generatorConfig.properties" /> | |
<!-- classPathEntry:数据库的JDBC驱动,换成你自己的驱动位置 --> | |
<classPathEntry location="${classPath}" /> | |
<context id="MBG" targetRuntime="MyBatis3" | |
defaultModelType="conditional"> | |
<plugin type="plugin.SelectByPagePlugin" /> | |
<!-- 此处是将Example改名为Criteria 当然 想改成什么都行~ | |
<plugin type="org.mybatis.generator.plugins.RenameExampleClassPlugin"> | |
<property name="searchString" value="Example$" /> | |
<property name="replaceString" value="Criteria" /> | |
</plugin> | |
--> | |
<plugin | |
type="org.mybatis.generator.plugins.EqualsHashCodePlugin" /> | |
<plugin | |
type="org.mybatis.generator.plugins.MapperConfigPlugin"> | |
<property name="fileName" value="GeneratedMapperConfig.xml" /> | |
<property name="targetPackage" | |
value="com.cy.mybatis.mbg.util" /> | |
<property name="targetProject" value="${targetProject}" /> | |
</plugin> | |
<commentGenerator> | |
<!-- 去除自动生成的注释 --> | |
<property name="suppressAllComments" value="true" /> | |
</commentGenerator> | |
<jdbcConnection driverClass="${driverClass}" | |
connectionURL="${connectionURL}" userId="${userId}" | |
password="${password}"> | |
</jdbcConnection> | |
<javaTypeResolver> | |
<property name="forceBigDecimals" value="false" /> | |
</javaTypeResolver> | |
<!-- targetProject:自动生成代码的位置 --> | |
<javaModelGenerator targetPackage="${modelPackage}" | |
targetProject="${targetProject}"> | |
<property name="enableSubPackages" value="true" /> | |
</javaModelGenerator> | |
<sqlMapGenerator targetPackage="${sqlMapperPackage}" | |
targetProject="${targetProject}"> | |
<property name="enableSubPackages" value="true" /> | |
</sqlMapGenerator> | |
<javaClientGenerator type="XMLMAPPER" | |
targetPackage="${daoMapperPackage}" | |
targetProject="${targetProject}"> | |
<property name="enableSubPackages" value="true" /> | |
</javaClientGenerator> | |
<!-- tableName:用于自动生成代码的数据库表;domainObjectName:对应于数据库表的javaBean类名 --> | |
<!-- | |
<table tableName="visitor_info" domainObjectName="Visitor" enableCountByExample="false" enableUpdateByExample="false" | |
enableDeleteByExample="false" enableSelectByExample="false" | |
selectByExampleQueryId="false"> | |
</table> | |
--> | |
<table tableName="weather_info" domainObjectName="Weather"> | |
</table> | |
</context> | |
</generatorConfiguration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment