-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55b1c5e
commit 1323fd9
Showing
3 changed files
with
69 additions
and
141 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?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> | ||
<!-- mybatis-generator:generate --> | ||
<!--targetRuntime="MyBatis3"--> | ||
<context id="MysqlTables" targetRuntime="tk.mybatis.mapper.generator.TkMyBatis3Impl"> | ||
|
||
<!-- 生成的Java文件的编码 --> | ||
<property name="javaFileEncoding" value="UTF-8"/> | ||
<!-- 格式化java代码--> | ||
<property name="javaFormatter" value="org.mybatis.generator.api.dom.DefaultJavaFormatter"/> | ||
<!-- 格式化XML代码 --> | ||
<property name="xmlFormatter" value="org.mybatis.generator.api.dom.DefaultXmlFormatter"/> | ||
<plugin type="${xml.mapperPlugin}"> | ||
<property name="mappers" value="${xml.mapperMapper}"/> | ||
<!-- caseSensitive默认false,当数据库表名区分大小写时,可以将该属性设置为true --> | ||
<property name="caseSensitive" value="true"/> | ||
</plugin> | ||
<!-- 去掉生成出来的代码的注解 --> | ||
<commentGenerator> | ||
<property name="suppressAllComments" value="true"/> | ||
<property name="suppressDate" value="true"/> | ||
</commentGenerator> | ||
<jdbcConnection driverClass="${jdbc.driver}" | ||
connectionURL="${jdbc.url}" | ||
userId="${jdbc.username}" | ||
password="${jdbc.password}"/> | ||
|
||
<javaTypeResolver> | ||
<property name="forceBigDecimals" value="true"/> | ||
</javaTypeResolver> | ||
|
||
<javaModelGenerator targetPackage="${xml.modelPackage}" | ||
targetProject="${xml.javaProject}"> | ||
<property name="enableSubPackages" value="true"/> | ||
<property name="trimStrings" value="true"/> | ||
</javaModelGenerator> | ||
|
||
<sqlMapGenerator | ||
targetPackage="${xml.xmlPackage}" | ||
targetProject="${xml.resourcesProject}"> | ||
<property name="enableSubPackages" value="false"/> | ||
</sqlMapGenerator> | ||
|
||
<javaClientGenerator | ||
targetPackage="${xml.mapperPackage}" | ||
targetProject="${xml.javaProject}" | ||
type="XMLMAPPER"> | ||
|
||
</javaClientGenerator> | ||
<!-- 这里设置表的相关信息 --> | ||
<table tableName="m_phone_log" domainObjectName="PhoneLog1" mapperName="{0}Dao" | ||
enableCountByExample="false" enableUpdateByExample="false" | ||
enableDeleteByExample="false" enableSelectByExample="false" modelType="flat"> | ||
<property name="useActualColumnNames" value="false"/> | ||
<generatedKey column="" sqlStatement="MySql" identity="true"/> | ||
<!--<generatedKey column="ID"--> | ||
<!--sqlStatement="SELECT LAST_INSERT_ID()" />--> | ||
</table> | ||
</context> | ||
|
||
</generatorConfiguration> |