Intellij idea entity class error Cannot resolve table'XX'

· First, the prompt can be ignored

Insert picture description here
Does not affect your function! If it is not OCD, duck ignore it.

· Idea add your database information

1. Open the Database interface

Insert picture description here

2. Add the corresponding database

Insert picture description here

3. Configure database information

Insert picture description here

4. Final effect

Insert picture description here

Here you can go to operate your database, but the problem has not been solved yet, we will continue to look down.

· Corresponding entity classes to tables

1. view->Persistence

Insert picture description here

2. The Persistence window appears

Right click on Factory -> Assign Data Sources
Insert picture description here

Configure the corresponding DataSource

Insert picture description here
Let's look at the final result next.
Insert picture description here
This article is over, I hope to help you.

Guess you like

Origin blog.csdn.net/weixin_42201180/article/details/107232823