What dependency am I missing? I am currently using:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.0.5.RELEASE</version>
</dependency>
The error Im getting is: The import org.springframework.web.bind cannot be resolved
To resolve, Update Spring Frame Work to 3.2.0 or above!
Add this below dependency in your pom.xml
This is used for
@RestController
,@RequestMapping
Sometimes there is some error in the local Maven repo. So please close your eclipse and delete the jar spring-webmvc from your local .m2 then open Eclipse and on the project press Update Maven Dependencies.
Then Eclipse will download the dependency again for you. That how I fixed the same problem.
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.
This solution WORKS , I had the same issue and after hours I came up to this:
(1) Go to your pom.xml
(2) Add this Dependency :
(3) Run your Project