Importing spring project

Hey,

I'm using tutorial https://spring.io/guides/gs/rest-service/

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?
2 comments
Comment actions Permalink

Did you import the project from Maven or from Gradle?

Attach idea.log (https://intellij-support.jetbrains.com/entries/23352446).

0
Comment actions Permalink

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

0

Please sign in to leave a comment.