Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Auto import annotations in IntelliJ

Is there a way to auto import annotations in IntelliJ?
When I place the cursor on @Entity annotation and press ALT+Enter. I don’t find a option to add:

import javax.persistence.Entity;

Does any configuration need to be done to enable it?

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Inside of your editor preferences (open using shortcuts ⌘, (macOS), or Ctrl+Alt+S (Windows/Linux)).

Go to Editor > General > Auto Import, be sure the correct values are checked. It should look similar to this:
enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading