ibator 插件 abator配置详解(ibatis自动生成实体类)
来源:互联网 发布:互助系统源码带排单币 编辑:程序博客网 时间:2024/05/29 11:45
1.安装abator插件, 用自动的就好. url:http://ibatis.apache.org/tools/abator.安装就不用多说了.
2.安装完成后.在新建的框框中就会多了一个.Abator for ibatis Wizard --->abator for ibatis configuration file .
3.建 配置文件.: abatorConfig.xml
在src右键.选择2步中的file 创建.文件名默认的. 建好后里面的选项就都有了 值都是???.
问号就是我们要改的:
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE abatorConfiguration PUBLIC "-//Apache Software Foundation//DTD Abator for iBATIS Configuration 1.0//EN" "http://ibatis.apache.org/dtd/abator-config_1_0.dtd" >
<abatorConfiguration >
<abatorContext >
<jdbcConnection driverClass="com.mysql.jdbc.Driver" //jdbc的驱动名. 我用mysql
connectionURL="jdbc:mysql://127.0.0.1:3306/housedetails1" //数据库的连接字符串.
userId="root" //用户名
password="mysql"> //密码
<classPathEntry location="mysql-connector-java-5.0.8-bin.jar" /> //mysql的连接驱动包.我放在项目的lib下面.只写包名就可以了. 否则要写文件全路径.d://java/mysql.jar.
</jdbcConnection>
//targetProject : 目标源文件夹位置 写项目名 ,可以不是当前的项目名.只写项目名默认从src目录下开始
<sqlMapGenerator targetPackage="com.mye.sqlmap.interview" targetProject="hibernateUtil" /> //targetPackage:是sqlmap xml文件存放的路径.
<daoGenerator targetPackage="com.mye.dao.interview" targetProject="hibernateUtil/src" type="IBATIS" /> //targetPackage:是dao存放的路径. type:一般写spring.
type:如果写"SPRING" 生成的daoimpl 继承的是SqlMapClientDaoSupport.是 org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
如果写"IBATIS"生成的daoimpl类继承的是SqlMapDaoTemplate. 是com.ibatis.dao.client.template.SqlMapDaoTemplate
如果是GENERIC-CI 生成的daoimpl 没有继承.是com.ibatis.sqlmap.client.SqlMapClient .
<table schema="bim_web_extwall" tableName="bim_web_extwall" catalog="housedetails1"></table> //table中有个了项<columnOverride column="???" property="???" /> 可以先不用配置,删除就可以了 table中schema 写表名.catalog写数据库名称我试过 <table tableName="nrel_air_sealing"></table> 就这样只写表名也可以.有些说要加上schema和catalog
<table schema="bim_web_construction" tableName="bim_web_construction"></table>
<table schema="bim_web_extwall_sub" tableName="bim_web_extwall_sub" catalog="housedetails1"></table>
<table schema="bim_web_door" tableName="bim_web_door" ></table>
<table schema="bim_web_roof" tableName="bim_web_roof" catalog="housedetails1"></table>
<table schema="bim_web_window" tableName="bim_web_window" catalog="housedetails1"></table>
</abatorContext>
</abatorConfiguration>
- ibator 插件 abator配置详解(ibatis自动生成实体类)
- ibatis简例1-用ibator插件自动生成sqlmap
- ibatis简例1-用ibator插件自动生成sqlmap
- Ibatis自动生成工具-Abator
- iBatis 代码自动生成工具 iBator
- ibatis代码自动生成工具ibator
- iBatis 代码自动生成工具 iBator
- iBatis 代码自动生成工具 iBator
- ibatis自动生成工具,abator使用方法
- ibatis自动生成工具,abator使用方法
- 为 Ibatis 2.3.4 构建增强的 Apache Ibator 实体类生成工具
- ibatis代码自动生成工具ibator修改备忘
- iBatis 代码自动生成工具 iBator 及 Example 使用
- iBatis 代码自动生成工具 iBator 及 Example 使用
- iBatis 代码自动生成工具 iBator 及 Example 使用
- ibatis - 自动代码生成工具abator 使用介绍
- ibatis - 自动代码生成工具abator 使用介绍
- 使用abator自动生成ibatis代码的经验
- Unicode 下宽字节与多字节之间的转换
- LOAD_DLL_DEBUG_EVENT调试事件
- MongoDB安装及使用
- 富人和穷人间存在的十二个致命差异
- SQL 2005 - 排名函数
- ibator 插件 abator配置详解(ibatis自动生成实体类)
- 黑马程序员----7.09
- VC 在DLL中使用全局变量出现异常问题
- 水晶报表学习1
- 鬼影3样本Mbr之后保护模式代码详细注释(最精华的地方啦)
- 黑马程序员-jdk1.5的新特性---静态导入
- c++ 成员函数指针
- Latex learning-title/author/abstract/keywords
- 修改tomcat启动端口,并让tomcat作为系统服务后台启动