国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計 > 正文

myEclipse2014集成MyBatis插件自動生成代碼

2019-11-10 18:12:54
字體:
供稿:網(wǎng)友

集成過程:

1。選擇 Help->Install from site...

2。在彈出的對話框中點擊右上角的Add按鈕。

3。在彈出的對話框中輸入

Name:mybatis

Location:https://dl.bintray.com/mybatis/mybatis-generator

(location中可以輸入以上地址,也可以點擊Archive,選擇本地已經(jīng)下載好的jar、zip壓縮文件:org.mybatis.generator.eclipse.site-1.3.5.201609070108.zip)

點擊OK

4。在Work with 選擇mybatis - https://dl.bintray.com/mybatis/mybatis-generator或者自己選擇的本地路徑

(個人建議先下載好,選擇本地安裝,這樣速度快,在線安裝太慢)

5。鉤選MyBatis Generator點擊next

6。之后安裝完成,重啟myeclipse即可

過程轉(zhuǎn)自:http://www.cnblogs.com/lzxlfly/p/6146012.html

生成代碼的過程:

新建generatorConfig.xml

<?xml version="1.0" encoding="UTF-8"?>        <!DOCTYPE generatorConfiguration          PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"          "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"><generatorConfiguration> <classPathEntry  location="E:/Myeclipse/aaaaaaa/WebRoot/WEB-INF/lib/MySQL-connector-java-5.1.26-bin.jar"/>      <context id="DB2Tables" targetRuntime="MyBatis3">        <commentGenerator>            <PRoperty name="suppressDate" value="true" />            <!-- 是否去除自動生成的注釋 true:是 : false:否 -->            <property name="suppressAllComments" value="true" />        </commentGenerator>        <!--數(shù)據(jù)庫鏈接URL,用戶名、密碼 -->        <jdbcConnection driverClass="com.mysql.jdbc.Driver"            connectionURL="jdbc:mysql://localhost/scm" userId="root"            passWord="951207">        </jdbcConnection>        <javaTypeResolver>            <property name="forceBigDecimals" value="false" />        </javaTypeResolver>        <!-- 生成模型的包名和位置 -->        <javaModelGenerator targetPackage="com.bean"            targetProject="aaaaaaa">            <property name="enableSubPackages" value="true" />            <property name="trimStrings" value="true" />        </javaModelGenerator>        <!-- 生成映射文件的包名和位置 -->        <sqlMapGenerator targetPackage="com.mapper"            targetProject="aaaaaaa">            <property name="enableSubPackages" value="true" />        </sqlMapGenerator>        <!-- 生成DAO的包名和位置 -->        <javaClientGenerator type="XMLMAPPER"            targetPackage="com.dao" targetProject="aaaaaaa">            <property name="enableSubPackages" value="true" />        </javaClientGenerator>        <!-- 要生成哪些表 -->        <table tableName="account" domainObjectName="AboutDto"            enableCountByExample="false" enableUpdateByExample="false"            enableDeleteByExample="false" enableSelectByExample="false"            selectByExampleQueryId="false"></table>    </context></generatorConfiguration>   

本文轉(zhuǎn)自:http://blog.csdn.net/u014481096/article/details/45025607


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 宁安市| 故城县| 扶沟县| 兴宁市| 武穴市| 长海县| 如东县| 朔州市| 红原县| 太保市| 五大连池市| 西充县| 定安县| 楚雄市| 班戈县| 钦州市| 额济纳旗| 齐齐哈尔市| 兰坪| 柳州市| 喀喇| 新巴尔虎右旗| 密山市| 聊城市| 那坡县| 咸丰县| 定日县| 雅安市| 六枝特区| 乌什县| 房产| 同德县| 台安县| 陇西县| 嘉祥县| 天祝| 峨山| 库车县| 库车县| 云林县| 泾阳县|