mybatis自动生成代码xml配置文件
来源:互联网 发布:淘宝质检报告怎么上传 编辑:程序博客网 时间:2024/06/04 18:56
<?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">
<!-- 配置mysql 驱动jar包路径.用了绝对路径 -->
<generatorConfiguration>
<classPathEntry location="C:\Users\user\.m2\repository\mysql\mysql-connector-java\5.1.18\mysql-connector-java-5.1.18.jar" />
<context id="lyx_mybatis_tables" targetRuntime="MyBatis3">
<!-- 为了防止生成的代码中有很多注释,比较难看,加入下面的配置控制 -->
<!-- <commentGenerator> -->
<!-- <property name="suppressAllComments" value="true" /> -->
<!-- <property name="suppressDate" value="true" /> -->
<!-- </commentGenerator> -->
<!-- 注释控制完毕 -->
<!-- 数据库连接 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/mybatis"
userId="root"
password="root">
</jdbcConnection>
<javaTypeResolver >
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<!-- 数据表对应的model 层 -->
<javaModelGenerator targetPackage="com.lyx.model" targetProject="d:\lib\src">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- sql mapper 映射配置文件 -->
<sqlMapGenerator targetPackage="com.lyx.mapper" targetProject="d:\lib\src">
<property name="enableSubPackages" value="true" />
</sqlMapGenerator>
<!-- 在ibatis2 中是dao层,但在mybatis3中,其实就是mapper接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.lyx.inter" targetProject="d:\lib\src">
<property name="enableSubPackages" value="true" />
</javaClientGenerator>
<!-- 要对那些数据表进行生成操作,必须要有一个. -->
<!-- 写了connectionURL可以不写schema -->
<table schema="mybatis" tableName="category" domainObjectName="Category"
enableCountByExample="false" enableUpdateByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false">
</table>
</context>
</generatorConfiguration>
- mybatis自动生成代码xml配置文件
- Mybatis代码自动生成配置文件
- Mybatis 如何自动生成bean dao xml 配置文件 generatorconfig.xml
- Mybatis -代码自动生成(generatorConfig.xml)
- mybatis 自动生成配置文件
- mybatis-generator自动生成java代码和配置文件的注意事项
- Mybatis generator 自动生成配置文件
- MyBatis代码自动生成
- mybatis 自动生成代码
- Mybatis自动生成代码
- Mybatis自动生成代码
- MyBatis代码自动生成
- Mybatis 代码自动生成
- MyBatis代码自动生成
- mybatis代码自动生成
- Mybatis代码自动生成
- MyBatis自动生成代码
- Mybatis自动生成代码
- POJ3321--Apple Tree
- web.xml的作用
- C#进化-命名实参、可选实参
- NYoj 44 子串和[经典动态规划2]
- 深入理解Oracle表(1):ORDERED和USE_NL
- mybatis自动生成代码xml配置文件
- 可以直接拿来用的jQuery代码片段
- 【分享】国内某公司物流记录数据库
- 图片搜索算法
- 今天项目测试发现的ajax请求阻塞
- python模块之binascii
- 分享30个独特的 404 错误页面设计模板
- 打印从1到最大的n位数
- TQ210搭载Android4.0.3系统构建之LED从驱动到HAL到JNI到应用程序(驱动篇)