ibatis自动生成工具ibator及配置文件示例

ibator安装很容易,有2种方式,在线和离线,在网上均有大把资料,使用也很简单,不再赘述。只提供ibator的配置文件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" >
<!-- ibator自动生成javabean和dao配置文件 -->
<ibatorConfiguration >
<!-- jdbc驱动包绝对位置 -->
<classPathEntry location="D:\Workspaces\MyEclipse 10\tracesource\WebRoot\WEB-INF\lib\mysql-connector-java-5.0.7-bin.jar" />
<ibatorContext id="tracesource" >
<!-- 连接字符串 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/tracevegetables" userId="root" password="root" />
<!-- javabean包位置 -->
<javaModelGenerator targetPackage="com.yanglong.model" targetProject="tracesource" />
<!-- sqlmap位置 -->
<sqlMapGenerator targetPackage="com.yanglong.model" targetProject="tracesource" />
<!-- dao位置 -->
<daoGenerator targetPackage="com.yanglong.dao" targetProject="tracesource" type="spring" />
<!-- 映射表 -->
<table tableName="cfg_pri_role" domainObjectName="CfgPriRole"/>
<table tableName="cfg_user_role" domainObjectName="CfgUserRole"/>
<table tableName="plant_fertilize_log" domainObjectName="FertilizeLog"/>
<table tableName="plant_info" domainObjectName="PlantInfo"/>
<table tableName="plant_medicine_log" domainObjectName="MedicineLog"/>
<table tableName="plant_soil_log" domainObjectName="SoilLog"/>
<table tableName="plant_water_log" domainObjectName="WaterLog"/>
<table tableName="planter_info" domainObjectName="PlanterInfo"/>
<table tableName="pri_info" domainObjectName="PrivilegeInfo"/>
<table tableName="reco_info" domainObjectName="FeedbackInfo"/>
<table tableName="roler_info" domainObjectName="RolerInfo"/>
<table tableName="store_environment_info" domainObjectName="StoreEnvirInfo"/>
<table tableName="store_vegequality_info" domainObjectName="VegetablesQuality"/>
<table tableName="transport_environment_info" domainObjectName="TransportEnvirInfo"/>
<table tableName="user_info" domainObjectName="UserInfo"/>
<table tableName="verify_info" domainObjectName="VerifyInfo"/>
</ibatorContext>
</ibatorConfiguration>

附插件包及去注释版jar包。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值