GitPedia

Generator

A code generator for MyBatis.

From mybatis·Updated June 26, 2026·View on GitHub·

This library will generate code for use with MyBatis. It will introspect a database table (or many tables) and will generate artifacts that can be used to access the table(s). This lessens the initial nuisance of setting up objects and configuration files to interact with database tables. MBG seeks to make a major impact on the large percentage of database operations that are simple CRUD (Create, Retrieve, Update, Delete). The project is written primarily in Java, distributed under the Apache License 2.0 license, first published in 2013. It has gained significant community traction with 5,317 stars and 2,482 forks on GitHub. Key topics include: code-generator, java-8, kotlin, mybatis, mybatis-generator.

Latest release: mybatis-generator-2.0.0MyBatis Generator 2.0.0
April 8, 2026View Changelog →

MyBatis Generator (MBG)

Build Status
Coverage
Maven Central
License
Quality Gate Status
Security Rating

mybatis-generator

This is a code generator for MyBatis.

This library will generate code for use with MyBatis. It will introspect a database table (or many tables) and will generate artifacts that can be used to access the table(s). This lessens the initial nuisance of setting up objects and configuration files to interact with database tables. MBG seeks to make a major impact on the large percentage of database operations that are simple CRUD (Create, Retrieve, Update, Delete).

MBG can generate code in multiple styles (or "runtimes"). MBG can generate code for Java based projects, or for Kotlin based projects.

MBG can be run in multiple ways - from the command line, with an Ant task, as a Maven plugin, etc. See this page for details:
Running MBG

Eclipse

There is an Eclipse feature for MBG as well. Here's how to install it:

Eclipse Update Site (Marketplace)

The easiest way to install the Eclipse feature is from the Eclipse Marketplace at this address: https://marketplace.eclipse.org/content/mybatis-generator

Eclipse Update Site (Direct)

You can also manually configure an Eclipse update site for the generator. The update site is here: https://jeffgbutler.github.io/mybatis-generator-update-site/

From the Release Bundle

You can manually install the plugin by downloading a zip file containing the update site from the GitHub release page here: https://github.com/mybatis/generator/releases

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from mybatis/generator via the GitHub API.Last fetched: 6/27/2026