What dependency am I missing? I am currently using:
org.springframework
spring-w
-> Go to pom.xml
-> Add this Dependency :
-> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.1.6.RELEASE</version>
</dependency>
->Wait for Rebuild or manually rebuild the project
->if Maven is not auto build in your machine then manually follow below points to rebuild
right click on your project structure->Maven->Update Project->check "force update of snapshots/Releases"
the problem's actually caused by dependency. I spent whole the day to solve this prblm. Firstly, right click on project > Maven > add dependency
In "EnterGroupId, ArtifactId, or sha1...." box, type "org.springframework".
Then, from droped down list, expand "spring-web" list > Choose the newest version of jar file > Click OK.
Done!!!
I had almost the same problem but it was just because some .jar library wasn't updated.
I couldn't use @RequestMapping cause that, just "mouse over @RequestMapping" and click on "Fix ..." and the .jar library will be downloading and installing.
Add this below dependency in your pom.xml
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
This is used for @RestController
, @RequestMapping