techie11
techie11

Reputation: 1387

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

Upvotes: 0

Views: 244

Answers (1)

Justin Adams
Justin Adams

Reputation: 95

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

Upvotes: 1

Related Questions