eclipse ibatis abator插件

eclipse 安装插件

1.输入插件地址:http://ibatis.apache.org/tools/abator

  新建插件

2.创建abatorConfig.xml文件

  通过File>创建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="com.mysql.jdbc.Driver"
        connectionURL="jdbc:mysql://localhost:3306/ocean"
        userId="root"
        password="root123">
      <classPathEntry location="D:\tools\mysql-connector-java-5.1.16\mysql-connector-java-5.1.16-bin.jar" />
    jdbcConnection>

    <javaModelGenerator targetPackage="com.mysql.model" targetProject="Test" />
    <sqlMapGenerator targetPackage="com.mysql.sqlMap" targetProject="Test" />
    <daoGenerator type="IBATIS" targetPackage="com.mysql.dao" targetProject="Test" />

    <table schema="root" tableName="report_card">
    table>
  abatorContext>
abatorConfiguration>


点击文件生成相应表的model,sqlMap,dao(三者都需要配置,不然会报错)。

使用起来非常的方便,可以省却很多繁琐重复的操作。

 

转载于:https://www.cnblogs.com/ocean-san/p/4793196.html

你可能感兴趣的:(eclipse ibatis abator插件)