Ibator 的使用

http://people.apache.org/builds/

 

1、新建一个test项目

2、在test项目中new-> other->Apache iBATIS Ibator ->Apache iBATIS Ibator Configuration File ->Next ->Finish

3、配置ibatorConfig.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ibatorConfiguration PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS Ibator Configuration 1.0//EN" "http://ibatis.apache.org/dtd/ibator-config_1_0.dtd" >
<ibatorConfiguration>
<!-- 数据库驱动 -->
	<classPathEntry location="E:\classes12.jar" />

	<ibatorContext id="test">
<!-- 注释 -->
		<commentGenerator>
			<property name="suppressDate" value="true" />
		</commentGenerator>
<!-- 数据库的设置 -->
		<jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
			connectionURL="jdbc:oracle:thin:@localhost:1521:orcl" userId="test"
			password="test" />
			<!-- 实体类的设置 -->
		<javaModelGenerator targetPackage="com.demo.beans"
			targetProject="test" />
			<!-- SqlMap文件的设置 -->
		<sqlMapGenerator targetPackage="com.demo.beans"
			targetProject="test" />
			<!-- DAO层的设置 -->
		<daoGenerator targetPackage="com.demo.dao" targetProject="test"
			type="GENERIC-CI" />
			<!-- 表的设置 -->
		<table tableName="test">

		</table>
	</ibatorContext>
</ibatorConfiguration>

   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值