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.
You can restore the mybatis log output from the console to executable SQL statements.
You can select filter on and pause.
You can choose whether to format SQL as needed.
You can customize filtering rules.
You can customize the colors of different SQL statement types as needed.
Manually capture SQL
Select the console SQL log and right-click the capture SQL menu to restore SQL.
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|
Idea — > setting — > plugins — > search mybatis log plus
IDEA–>Setting–>Plugins–> “Install plugin from disk…”
Select the zip installation package and directly click OK to complete the installation!
Wechat official account “Java post station” background, send: plug-in, you can receive the installation package!