In a rage, he developed an idea plug-in [mybatis log plus]

Time:2022-5-11

cause

In recent project development, an advanced query function is involved. SQL is nearly 100 lines long. When troubleshooting SQL problems, it needs to be spliced into executable SQL. Some of the mybatis log plug-ins on the market are charged, and some are only applicable to the lower version of idea, and SQL is often lost. The process is painful. So, in a rage, he developed a mybatis log plus plug-in.

Function introduction

Restore SQL

You can restore the mybatis log output from the console to executable SQL statements.

Filter switch

You can select filter on and pause.

In a rage, he developed an idea plug-in [mybatis log plus]

picture

SQL formatting

You can choose whether to format SQL as needed.

In a rage, he developed an idea plug-in [mybatis log plus]

picture

Custom rules

You can customize filtering rules.

In a rage, he developed an idea plug-in [mybatis log plus]

picture

Custom color

You can customize the colors of different SQL statement types as needed.

In a rage, he developed an idea plug-in [mybatis log plus]

picture
In a rage, he developed an idea plug-in [mybatis log plus]

picture

Manually capture SQL

Select the console SQL log and right-click the capture SQL menu to restore SQL.

In a rage, he developed an idea plug-in [mybatis log plus]

picture

Version Description

Since the source code of IntelliJ project was migrated to jdk11 in September 2020, jdk11 will be required to start ide 2020.3 and above based on IntelliJ.Therefore, two versions have been developed, and the applicable version of idea is as follows:

version IntelliJ IDEA version
mybatis-log-plus-2.0.0.zip IDEA 2020.2~IDEA 2021.3
mybatis-log-plus-1.0.0.zip IDEA 2017.2 ~ IDEA 2020.2

Installation tutorial

Online installation:

Idea — > setting — > plugins — > search mybatis log plus

In a rage, he developed an idea plug-in [mybatis log plus]

image.png

Local installation:

IDEA–>Setting–>Plugins–> “Install plugin from disk…”

In a rage, he developed an idea plug-in [mybatis log plus]

picture

Select the zip installation package and directly click OK to complete the installation!

In a rage, he developed an idea plug-in [mybatis log plus]

picture

Wechat official account “Java post station” background, send: plug-in, you can receive the installation package!