mybatis
The official MyBatis Generator, which can be used in the form of an XML configuration file, such as writing a call script yourself, or using the MVN plugin, is actually quite simple to implement. Although simple, but still not simple, lazy, this does not realize a simpler way to build, through the Web page, fill in a few key configuration parameters, select the database table to be generated.
There are several configurable parameters.
Targetruntime:mybatis3, Mybatis3simple, IBATIS2JAVA2, ibatis2java5, default = MyBatis3
Whether to uncomment: the resulting file will have comments in the default, and you can choose whether to cancel.
Targetproject (file generation directory): The directory where the file was last saved, select a directory location on the local disk.
Entity class Package Name: The package name of the entity object.
directory where the Mapper.xml file is located: The directory where the XML file resides
Mapper Interface Class Package name: The package name of the Mapper interface class
Database driver: Only MySQL is currently supported
Database connection string, database user, database user password: database-related configuration
Start Mode Mode 1:
Download the source code directly, then run the BuilderApplication
file, or run it using MVN spring-boot:run
Mode 2:
Download Kite-mybatis-builder.jar, Run command java -jar -Dserver.port=[port] kite-mybatis-builder.jar
or java -jar kite-mybatis-builder.jar
run on port 9090 by default
How to use
If you run the default port 9090, open the browser to access http://localhost:9090.
- When the default is open, click New Project.
- In the popup project configuration interface, fill in the configuration parameters mentioned above
- Select the tables you want to build, and you can configure the entity names later, with the default rule to capitalize the first letter of each word.
Click the Generate button to indicate success or failure based on the result of the build.
The generated items are listed on the first page, and the next time you need to generate a table for this database, you can reconfigure the selections in the previous project.
* * * If you do not abandon the welcome attention to my public number.
? Click here to go to GitHub
Made a web version of MyBatis Generator