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>

   

你可能感兴趣的:(bat)