mybatis generator with oracle
1.generator.xml
<?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>
<classPathEntry location="C:\Users\rocky\.m2\repository\com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.jar" />
<context id="MyBatis3" targetRuntime="MyBatis3">
<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver" connectionURL="jdbc:oracle:thin:@192.168.1.5:1521:MYDB"
userId="rocky" password="rocky">
</jdbcConnection>
<javaModelGenerator targetPackage="com.myproject.rocky.web.model" targetProject="./src">
</javaModelGenerator>
<sqlMapGenerator targetPackage="com.myproject.rocky.web.dao" targetProject="./src">
</sqlMapGenerator>
<javaClientGenerator type="XMLMAPPER" targetPackage="com.myproject.rocky.web.dao"
targetProject="./src">
</javaClientGenerator>
<table tableName="OBJ_USER" schema="rocky" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false">
<property name="ignoreQualifiersAtRuntime" value="true" />
<property name="runtimeTableName" value="OBJ_USER" />
</table>
</context>
</generatorConfiguration>
2. mybatis-generator-core-1.3.2.jar
3. java -jar mybatis-generator-core-1.3.2.jar -configfile generator.xml -overwrite
4. some problems:
~if the table short of primary key, you maynot generate the right mapper file and interface(only has the insert method).
mybatis generator with oracle的更多相关文章
- Mybatis Generator的model生成中文注释,支持oracle和mysql(通过实现CommentGenerator接口的方法来实现)
自己手动实现的前提,对maven项目有基本的了解,在本地成功搭建了maven环境,可以参考我之前的文章:maven环境搭建 项目里新建表时model,mapper以及mapper.xml基本都是用My ...
- Mybatis Generator的model生成中文注释,支持oracle和mysql(通过修改源码的方式来实现)
在看本篇之前,最好先看一下上一篇通过实现CommentGenerator接口的方法来实现中文注释的例子,因为很多操作和上一篇基本是一致的,所以本篇可能不那么详细. 首先说一下上篇通过实现Comment ...
- mybatis generator.xml 配置 自动生成model,dao,mapping
generator.xml文件: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE gener ...
- Mybatis generator的使用
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration ...
- Mybatis Generator生成工具配置文件详解
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration ...
- mybatis generator使用总结
一.mybatis项目的体系结构 百度mybaits,可以进入mybatis的github:https://github.com/mybatis. mybatis是一个大大的体系,它不是孤立的,它可以 ...
- 【Java MyBatis Generator】使用generator自动生成Dao,Mapping和实体文件
具体请参照: http://blog.csdn.net/fengshizty/article/details/43086833 按照上面博客地址,下载Generator的依赖包: 如下是我的配置文件: ...
- MyBatis Generator自动生成的配置及使用
注意:文件名不能有中文字符,不然不能自动生成 找到MyBatis Generator.rar\MyBatis Generator\eclipse里的features和plugins文件,把这两个文件复 ...
- mybatis generator配置文件
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration ...
随机推荐
- Kruskal算法java版
/** * sample Kruskal.java Description: * kruskal算法的思想是找最小边,且每次找到的边不会和以找出来的边形成环路,利用一个一维数组group存放当前顶点所 ...
- Xcode工程使用CocoaPods管理第三方库新建工程时出现错误
工程使用CocoaPods管理第三方库,在新的目录update版本的时候出现如下问题 问题1描述: diff: /../Podfile.lock: No such file or director ...
- 如何安装最新版本的memcached
转载自孟叔的博客: https://learndevops.cn/index.php/2016/06/10/how-to-install-the-latest-version-of-memcache ...
- nginx+lua_nginx+GraphicsMagick生成实时缩略图
暂做笔记,带后续验证通过后,再补充 1.2.3 步. 一.安装 lua 首先确认是否安装 readline yum -y install readline-devel ncurses-devel 进入 ...
- Xenia and Bit Operations(线段树单点更新)
Xenia and Bit Operations time limit per test 2 seconds memory limit per test 256 megabytes input sta ...
- VueJs2.0建议学习路线
最近VueJs确实火了一把,自从Vue2.0发布后,Vue就成了前端领域的热门话题,github也突破了三万的star,那么对于新手来说,如何高效快速的学习Vue2.0呢. 既然大家会看这篇文章,那么 ...
- JS&CSS文件请求合并及压缩处理研究(一)
在我们日常的网站开发工作中,一个页面难免会引用到各种样式及脚本文件.了解Web开发的朋友们都知道,页面引用的每一个: <link href="style.css" rel=& ...
- Vim杂记:Sublime的配色方案
一.前言 爱美之心人皆有之,sublime的配色实在好看,于是希望Vim也能这样. 二.配置 1.下载monokai(https://github.com/sickill/vim-monokai),然 ...
- Gradle学习系列之二——创建Task的多种方法
在本系列的上篇文章中,我们讲到了Gradle入门,在本篇文章中我们将讲到创建Task的多种方法. 请通过以下方式下载本系列文章的Github示例代码: git clone https://github ...
- C#中国象棋+游戏大厅 服务器 + 客户端源码
来源:www.ajerp.com/bbs C#中国象棋+游戏大厅 服务器 + 客户端源码 源码开源 C#版中国象棋(附游戏大厅) 基于前人大虾的修改版 主要用委托实现 服务器支持在线人数,大厅桌数的设 ...