Spring Data JPA intelligence not working in Intellij

I solved this problem by adding JavaEE Persistence framework support. Just right click on the project, select Add Framework Support and then scroll down to find the JavaEE Persistence, then enable the checkbox and hit OK:

Enabling JavaEE Persistence Support
Adding JavaEE Persistence Facet

It will add a persistence.xml file, you can delete it. Finally your auto completions will be back:

Moment of truth
Moment of truth

Update You can also enable JPA facet in the Project Structure. First, press Ctrl Alt Shift S or go to Files > Project Structure. Hit the Add button and in the menu, then select JPA:

enter image description here
Adding JPA Facet

And finally hit OK.

Leave a Comment