1. Plugin download
mybatis_generator_1.3.1
2. Copy files under features and plugins to eclipse
3. Generate MyBatis Profile file
Eclipse in File->new->other
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/6E/wKiom1XPA7iDrLMZAAC8V-mrO3M750.jpg "title=" QQ picture 20150815171711.png "alt=" Wkiom1xpa7idrlmzaac8v-mro3m750.jpg "/>
Click Next
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/6A/wKioL1XPBhvgLELsAAD2zgiemGs820.jpg "title=" Qq20150815171835.jpg "alt=" Wkiol1xpbhvglelsaad2zgiemgs820.jpg "/>
Click Finish to generate Generatorconfig.xml
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/71/6E/wKiom1XPBHejfJwuAACVSLwbSjI974.jpg "title=" QQ picture 20150815172042.png "alt=" Wkiom1xpbhejfjwuaacvslwbsji974.jpg "/>
Content is as follows
<?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 > <context id= "Context1" > <jdbcconnection driverclass= "???" connectionurl= "???" userid= "???" password= "???" /> <javamodelgenerator targetpackage= "???" targetproject= "???" /> <sqlmapgenerator targetpackage= "???" targetproject= "???" /> <javaclientgenerator targetpackage= "???" targetproject= "???" type= "Xmlmapper" /> <table schema= "???" tablename= "???" > <columnoverride column= "???" Property= "???" /> </table> </context></generatorConfiguration>
Rename Generatorconfig.xml to Mybatisgeneratorconfig.xml and edit
This article is from the "Ruchunli's work Notes" blog, so be sure to keep this source http://luchunli.blog.51cto.com/2368057/1684877
Configuring the MyBatis Generator plugin in eclipse