The usual operation before is to copy the interface name in the Mapper interface, and then search for the corresponding XML file. After opening, CRTL+F searches for the corresponding XML implementation. The whole process is very inefficient. After searching, it turns out that some seniors have released an IDEA plug-in to solve this problem, and recommend this useful jump plug-in to everyone.
1. Introduction
Free MyBatis Tool is a free plug-in that enhances IntelliJ IDEA's support for MyBatis. It provides many convenient functions for MyBatis development. The plug-in supports fast jump between Mappers, syntax error prompts, and code generation. Using it can improve development to a certain extent. efficiency.
The most important thing on my side is to use its jump navigation function, which can quickly jump from the Mapper.java file to the sql code block of the object in xml.
2. Installation
File -> Settings
Plugins -> Marketplace -> Enter Free MyBatis, wait for a while -> click Install on Free MyBatis Tool, wait for a while -> OK -> Restart IDEA
Three, use
1. Code generation
Due to limited personal ability, I will not start the narrative for now.
Can refer to: Use of Free Mybatis plugin in IDEA_7rulyL1ar's Blog-CSDN Blog
2. Mapper interface jump
The green arrows in the Mapper interface file and the Mapper.xml file can jump to each other after clicking
3. Error message
When there is a mismatch between Mapper.xml and the entity class or Mapper interface file, a red prompt will appear
4. Automatically generate mapper.xml file
Due to limited personal ability, I will not start the narrative for now.
Can refer to: IDEA plugin Free Mybatis plugin_Fan Yaming's Blog-CSDN Blog
Create a new mapper interface, Alt+enter pops up the following window
5. Generate statement statement
Due to limited personal ability, I will not start the narrative for now.
Can refer to: IDEA plugin Free Mybatis plugin_Fan Yaming's Blog-CSDN Blog
alter+enter pops up
2. Use of Free Mybatis plugin in IDEA_7rulyL1ar's Blog-CSDN Blog
3. IDEA plugin Free Mybatis plugin_Fan Yaming's Blog-CSDN Blog