'Cannot resolve table "'xx"" in spring boot application

I'm trying to run a spring boot app, but intellij is showing me an error:

"Cannot resolve table TB_PRODUTO"

Intellij it's giving a tip to assign a datasource, but the list is empty

enter image description here

what could be the problem?



Solution 1:[1]

You can turn off this validation from JPA facet settings.

Just go to Intellij IDEA settings/Editor/Inspections and uncheck "unresolved database references in annotations".

Intellij Settings Screenshot

Solution 2:[2]

I resolved going into view -> tool windows -> database.

Intellij needs that you put manually the database source.

Solution 3:[3]

file => setting => Editor = Inspections => JPA => uncheck "unresolved database references in annotations".and the problem will be solved

Solution 4:[4]

If you have recently added database objects then JPA may not be detecting them yet - use view - tool windows - database and click the refresh button.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 RĂ´mulo Sorato
Solution 3 mir pekiro
Solution 4 Dan Crosby