Importing spring project


I'm using tutorial

To learn about spring. When I imported the project I'm getting the Cannot resolve symbol @RestController

The import is:

import org.springframework.web.bind.annotation.RestController;

I added framework support, which downloaded the sptring libs.

However Alt + Enter does not give me the right import from the downloaded libs.

What is the correct way to import it?
Comment actions Permalink

Did you import the project from Maven or from Gradle?

Attach idea.log (

Comment actions Permalink

Yes, the problem was that I didn't import it as Maven. Works now.


Please sign in to leave a comment.