Home > OS >  Auto import annotations in IntelliJ
Auto import annotations in IntelliJ

Time:12-18

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

CodePudding user response:

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

  • Related