The problem that the table name does not exist in the process of using MyBatisPlus

Problem Description

When using MyBatisPlus to do a query, a non-existent table appeared, resulting in an SQL error, and Baidu did not find the answer after a round.

For example: check the information of the visitor_management table, but the entity class is VisitorDO, and the SQL statement printed on the console is Select * from visitor_d_o; an error is reported that the visitor_d_o table does not exist.

Cause of the problem

After using MyBatisPlus to generate code, the name of the entity class is modified, and the name of the entity class is inconsistent with the name of the database table.

problem solved

Rename the entity class to VisitorManagement, and the query statement becomes: Select * from visitor_management; the problem is solved.

Guess you like

Origin blog.csdn.net/qq_41941497/article/details/124589164