mybatiGenerator
<?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="init.properties"/> <!-- 指定数据连接驱动jar地址 -->
<classPathEntry location="${classPath}" /> <!-- 一个数据库一个context -->
<context id="infoGuardian">
<!-- 注释 -->
<commentGenerator >
<property name="suppressAllComments" value="false"/><!-- 是否取消注释 -->
<property name="suppressDate" value="true" /> <!-- 是否生成注释代时间戳-->
</commentGenerator> <!-- jdbc连接 -->
<jdbcConnection driverClass="${jdbc_driver}"
connectionURL="${jdbc_url}" userId="${jdbc_user}"
password="${jdbc_password}" /> <!-- 类型转换 -->
<javaTypeResolver>
<!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver> <!-- 生成实体类地址 -->
<javaModelGenerator targetPackage="com.oop.eksp.user.model"
targetProject="${project}" >
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property name="enableSubPackages" value="false"/>
<!-- 是否针对string类型的字段在set的时候进行trim调用 -->
<property name="trimStrings" value="true"/>
</javaModelGenerator> <!-- 生成mapxml文件 -->
<sqlMapGenerator targetPackage="com.oop.eksp.user.data"
targetProject="${project}" >
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property name="enableSubPackages" value="false" />
</sqlMapGenerator> <!-- 生成mapxml对应client,也就是接口dao -->
<javaClientGenerator targetPackage="com.oop.eksp.user.data"
targetProject="${project}" type="XMLMAPPER" >
<!-- 是否在当前路径下新加一层schema,eg:fase路径com.oop.eksp.user.model, true:com.oop.eksp.user.model.[schemaName] -->
<property name="enableSubPackages" value="false" />
</javaClientGenerator> <!-- 配置表信息 -->
<table schema="${jdbc_user}" tableName="s_user"
domainObjectName="UserEntity" enableCountByExample="false"
enableDeleteByExample="false" enableSelectByExample="false"
enableUpdateByExample="false">
<!-- schema即为数据库名 tableName为对应的数据库表 domainObjectName是要生成的实体类 enable*ByExample
是否生成 example类 --> <!-- 忽略列,不生成bean 字段 -->
<ignoreColumn column="FRED" />
<!-- 指定列的java数据类型 -->
<columnOverride column="LONG_VARCHAR_FIELD" jdbcType="VARCHAR" />
</table> </context>
</generatorConfiguration>
#Mybatis Generator configuration
project = EKSP
classPath=E:/workplace/EKSP/WebContent/WEB-INF/lib/ojdbc14.jar
jdbc_driver = oracle.jdbc.driver.OracleDriver
jdbc_url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
jdbc_user=INFOGUARDIAN
jdbc_password=info_idap132
mybatiGenerator的更多相关文章
- SpringBoot集成mybatis和mybatis generator
利用搭建的基本的spring boot框架,集成 mybatis + generator 1.设置 maven 的相关配置: File - setting - maven 设置 Maven home ...
随机推荐
- 随机函数的代码(srand、rand)
#include<stdio.h> int main() int counter; for(counter=0;counter<10;counter++) { srand(count ...
- mac快捷键
切换 1. 应用程序切换 command tab 2.应用程序中的窗口间切换 command ~ ===================== 通用 1. 隐藏窗口 command H 2. 最小化窗口 ...
- vim没有颜色
vim /etc/vim/vimrc #查找到syntax on 启用,去掉前面的" (引号).
- Spring事务配置的五种方式
Spring配置文件中关于事务配置总是由三个组成部分,分别是DataSource.TransactionManager和代理机制这三部分,无论哪种配置方式,一般变化的只是代理机制这部分. DataSo ...
- 【原】运动版的轮播图,有左右按钮和单独分页,原生JS版
运动版的轮播图,有左右按钮和单独分页 这个例子重点在于: 运动框架的复习,要灵活运动回调函数 始终以全局变量iNum来控制oUl的移动目的地,每次有任何动作,都是先判断iNum并改变iNum后去调用运 ...
- Maven私有仓库搭建和使用
下载和安装 下载地址: http://www.sonatype.com/nexus-repository-oss 安装: Linux版的无需安装,直接解压即可,然后进入bin目录下,运行./nexus ...
- 流水灯 外侧<->中间<->外侧
/* //side<-center->side //side->center<-side //loop *// #include "reg52.h" voi ...
- bug--service--Caused by java.lang.SecurityException: Unable to start service Intent { }:user 0 is restricted
http://bbs.coloros.com/thread-174655-1-1.html 急!!Service在OPPO系列手机下无法启动,寻求帮助 你好,我是网易邮件事业部1元夺宝开发工程师,最近 ...
- 64位系统上运行32位程序能否申请到8G内存?
申请不到,因为64为系统在运行32位程序的时候只是为了向下兼容而已,对于32位程序来讲,申请8G的存储空间没有任何意义,因为32位的程序最大寻址空间只有4G,32位程序在编译之后的机器代码也只有32位 ...
- C# char 和string之间转换
har数组要转换成string可没想象的那么容易.需要使用到System.Text.StringBuilder!实例如下: char[] temp={a,b,c};System.Text.String ...