The use of mybatis reverse engineering

Author: San Nian


1. Reverse Engineering

It is a reverse engineering officially provided by mybatis, which can automatically generate the code required for mybatis execution (including mapper.xml, mapper.java, pojo, etc.) for a single table.
Generally, in development, the commonly used reverse engineering method is to automatically generate code through database tables instead of manual writing.

2. Reverse engineering download

Link: https://pan.baidu.com/s/1YOAq8w-1gex9e-n8wFARpA Password: op9h

3. Reverse Engineering Demonstration

write picture description here

4. Configuration Reverse Engineering

数据库表

write picture description here

Configure the generatorConfig.xml file
write picture description here

5. Running reverse engineering will get the following (note the refresh)

write picture description here

Note: If you want to generate code again, you must delete the generated code first, otherwise it will be appended to the original file.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326098858&siteId=291194637