博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mybatis-Generator_学习_02_使用Mapper专用的MyBatis Generator插件
阅读量:7057 次
发布时间:2019-06-28

本文共 2235 字,大约阅读时间需要 7 分钟。

 源码见:

 

一、要点

 

 

二、具体实现

1.项目结构

 

2.配置 pm.xml

study-parent
com.ray.study
1.0-SNAPSHOT
4.0.0
jar
tk-mybatis-generator
${basedir}/src/main/java
tk.mybatis.mapper.mapper
tk.mybatis.mapper.model
${basedir}/src/main/resources
mapper
3.4.6
5.1.6
mmall
org.mybatis.generator
mybatis-generator-maven-plugin
1.3.2
${basedir}/src/main/resources/generator/generatorConfig.xml
true
true
mysql
mysql-connector-java
${mysql.version}
tk.mybatis
mapper
${mapper.version}
View Code

 

3.配置 generatorConfig.xml

View Code

 

 4. 配置 config.properties

# 数据库配置jdbc.driverClass = com.mysql.jdbc.Driverjdbc.url = jdbc:mysql://localhost:3306/mmalljdbc.user = rootjdbc.password =123#c3p0jdbc.maxPoolSize=50jdbc.minPoolSize=10jdbc.maxStatements=100jdbc.testConnection=true# 通用Mapper配置mapper.plugin = tk.mybatis.mapper.generator.MapperPluginmapper.Mapper = tk.mybatis.mapper.common.Mapper
View Code

 

 

 

 

 

 

 

 

三、参考资料

1.  abel533

(1) 

(2) 

(3) 

 

转载地址:http://drgol.baihongyu.com/

你可能感兴趣的文章
Golang HTTPS
查看>>
有效沟通绝技
查看>>
Socket的3次握手链接与4次断开握手
查看>>
PacketInterceptor的妙用
查看>>
FastDFS分布式文件系统——1.安装
查看>>
mysql在windows下的安装教程
查看>>
微软勉强地向Linux作出了用户妥协
查看>>
Twitter的RPC框架Finagle简介
查看>>
时速企业邮箱告诉您搭建企业邮箱服务器需要哪些配置?
查看>>
OAuth的机制原理讲解及开发流程
查看>>
微积分导论--Limit
查看>>
使用PHP Socket 编程模拟Http post和get请求
查看>>
memcached的使用-----php中的常规操作
查看>>
Myeclipse中字符编码的统一设置(以utf-8为例)
查看>>
C++入门学习——虚函数表介绍
查看>>
事件冒泡
查看>>
VS2008 快捷键大全
查看>>
字符串格式化1
查看>>
Base58 随机UUID
查看>>
npm 安装的模块不知道怎么用
查看>>