The previous article has introduced the use of the command to automatically generate MyBatis code, but every time to run the cmd command feel still a bit of trouble, so find some information found in eclipse can also install plug-in automatically generated code, the following brief introduction, but also for their future use when you leave an archive.
First or the download tool: http://download.csdn.net/detail/u010608551/9490134
After downloading, you will get a jar file and copy the file to the Eclipse installation directory under the Dropins folder to restart Eclipse (if it is not turned on directly)
(1) Create a new Web project, right click on the project name, select ibator for MyBatis Code Generator,
(2) Pop up a popup box, click the "Configure Connection" button, configure the type of database to be connected and details, click the "Table" button, select the database table to be generated, and then set the model and map generation path,
(3) Finally click on the "Confirm" button to find a number of files in the project, has automatically generated the files we need to:
MyBatis code generation (with Eclipse plugin)