Here is my POM.xml file:
1.6
3.2.2.RELEAS
I imported a project as 'Existing Maven Project' and was getting this issue.
Resolution: Changed Java Build Path of JRE System Library to Workspace defailt JRE [jdk 1.8]
Steps:
Right click on project -> build path -> configure build path -> Libraries Tab -> double click JRE System Library -> change to Workspace defailt JRE [jdk 1.8]
In my case I had to delete the jars inside .m2/repository
and then did a Maven->Update Maven Project
Looks like the jars were corrupt and deleting and downloading the fresh jar fixed the issue.
This answer from here helped me:
You should take a look at the build path of your project to check whether the referenced libraries are still there. So right-click on your project, then "Properties -> Java Build Path -> Libraries" and check whether you still have the spring library JARs in the place that is mentioned there. If not, just re-add them to your classpath within this dialog.
http://forum.spring.io/forum/spring-projects/springsource-tool-suite/98653-springframework-cannot-be-resolved-error
In my case I used the below pom.xml file here
and it worked for me.
Add the following JPA dependency.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
In my case, this issue was resolved by updating maven's dependencies: