• 周六. 10 月 12th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

Springboot integration mybatis plus error: not found @ tableid annotation, cannot use mybatis plus’

King Wang

1 月 3, 2022

In the integration SpringBoot Integrate MyBatis-Plus when , call selectById(id) When querying data, an error is reported

 

The page error message is :

 

In fact, you can see from the background log information :

 

You can see the prompt is :

Warn: Could not find @TableId in Class: com.hlt.entity.User.

class com.hlt.entity.User ,Not found @TableId annotation, Cannot use Mybatis-Plus ‘xxById’ Method.

This is because when the table does not contain a primary key , Warning given

 

resolvent : See if… Is set in this table id Primary key

                  See if the entity class is missing id Field

 

 

 

I am because I write less in entity class id Field , No mistake can be found everywhere , It turns out that there is something wrong with the entity class field .

 

发表回复