Skip to content
Owen edited this page Jun 21, 2016 · 2 revisions

Intrduction

Welcome to the mybatis-generator-gui wiki! This wiki will guide you how to use mybatis-generator-gui

mybatis-generator-gui is base on mybatis generator, while is a very excellent tool to generate mybatis relate DTO, DAO and Mapping files, for detail how to use mybatis geneator, please reference mybatis generator home website: http://www.mybatis.org/generator/index.html

Requirements

This tools require JRE 8.0, if you have JDK or JRE installed, you can download no jre version, otherwise you need download jre bundled version.

Downloads

You can download no jre release from here: https://github.com/astarring/mybatis-generator-gui/releases/download/v0.2/mybatis-generator-gui-no-jre.zip

Cause github upload release binary is very very slow, I just upload no jre version if I found it faster, I will upload the jre bundled version.

Building from source

git clone https://github.com/astarring/mybatis-generator-gui
cd mybatis-generator-gui
mvn jfx:jar

Run

Run mybatis-generator-gui

cd target/jfx/app/\
java -jar mybatis-generator-gui.jar

Usage

  • Step 1: Click Connections icon, input the JDBC connection information, click OK to save the connection
  • Step 2: Double click just saved DB conenction, select the schema your tables inside, then select the table you need to generate code.
  • Step 3: Select jdbc connector jar file from your local file system, and select your project folder.
  • Step 4: Input your Model Package that java POJO model and example file will generate, for example: com.exmaple.model, Target Folder means where your model package should save related to your project folder, if you use a maven default folder structure, you should be src/main/java
  • Step 5: Input your DAO Package that is the mapper file, such as com.example.dao, Target Folder is the folder where your mapper DAO save, for example it is src/main/java if it is a default maven project.
  • Step 6: Input the mapping XML Package, usually it is your project base package name, such as com.example, and Target Folder is the folder where your XML generate, for example is src/main/resoures if it is a default maven project.
Clone this wiki locally