IDEA plugin - MyBatis Builder

Plugin homepage | Source code | Donate

A free GUI tool integrated with MyBatis Generator, compatible with IntelliJ IDEA, Android Studio.

Supported databases: mysql/postgresql/oracle/sqlserver/sqlite/h2.

Provides with additional features as below.

  • Merge existing MyBatis files automatically.
  • Support select with lock statement.
  • Support Lombok @Data annotation on java model.
  • Customizable mapper annotation, default is Spring @Repository.
  • Customizable patterns for mapper type, example type and SQL file name.
  • "Copy as Executable SQL" from MyBatis log.
  • "Run MyBatis Generator" with official configuration file.

Snapshots:

  • Tool window appears on left bottom.
    1

  • Click the first button on toolbar to open Settings Dialog, manage connections, default settings and plugin settings.
    2-1
    2-2
    2-3

  • Select table(s) and then click the second button to open Building Dialog, configure MyBatis Generator parameters, click "Open" button to override or ignore column, click "Stash" button to save parameters without generation, click "OK" button to generate MyBatis files.
    3-1
    3-1-1
    3-2

  • Genereated result as following.
    4

  • Alternatively, right click on configuration file to "Run MyBatis Generator".
    5

  • An additional utility, select printed SQL on console and right click to "Copy as Executable SQL".
    6