IDEA installs MybatisX plug-in and uses it

1. Download the MybatisX plugin

  Open idea, File—>Setting—>Plugins—>Marketplace—>Search for MybatisX and install it.
insert image description here

2. Use the database that comes with IDEA

  First open the IDEA page, we first add the database
insert image description here
  can be opened here
insert image description here

  Add the MySQL database
insert image description here
  and fill in the information
insert image description here
  Select the database you use
insert image description here
  View the table structure in the database
insert image description here
  Create a new query and query the SQL statement
insert image description here

3. Automatic code generation

  Right-click the form that needs to generate code
insert image description here
  to fill in the information
insert image description here

insert image description here
insert image description here
  Click Finish to generate code
insert image description here

4. Write the sql statement prompt in the xml file

  set
insert image description here
  sql prompt
insert image description here

Guess you like

Origin blog.csdn.net/bai_mi_student/article/details/125374561