1.下载 AbatorForEclipse1.1.0

地址:http://download.csdn.net/detail/fym548/9426877

ibatis 自动生成map,bean,dao

点击Archive按钮选择下载的,然后重启MyEclipse

ibatis 自动生成map,bean,dao

 

新建一个项目,右键新增

ibatis 自动生成map,bean,dao

会生成一个 abatorConfig.xml 文件

<?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="???" connectionURL="???" userId="???" password="???" >
      <classPathEntry location="???" />
    </jdbcConnection>
    <javaModelGenerator targetPackage="???" targetProject="???" />
    <sqlMapGenerator targetPackage="???" targetProject="???" />
    <daoGenerator targetPackage="???" targetProject="???" type="GENERIC-CI" />
    <table schema="" tableName="???" >
    </table>
  </abatorContext>
</abatorConfiguration>

特别要注意版本要下对  不然自动生成不了  

driverClass:驱动名称
connectionURL:数据库链接地址
userId:数据库用户名

password:数据库用户密码
classPathEntry:驱动包路径,填写绝对路径

javaModelGenerator:模型层
sqlMapGenerator:ibatis  map层
daoGenerator:dao 层
table:表
schema如果在connectionURL里面填写了,这里就不要写,如果没这里要写
tableName:表名

填写完后右键选择这个文件,选择

ibatis 自动生成map,bean,dao


就可以自动生成了

相关文章:

  • 2021-07-31
  • 2022-12-23
  • 2021-12-29
  • 2021-12-22
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
猜你喜欢
  • 2021-09-30
  • 2021-11-02
  • 2021-10-23
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2021-08-06
相关资源
相似解决方案