I imported a Maven project and it used Java 1.5 even though I have 1.6 configured as my Eclipse default Preferences->Java->Installed JREs.
Preferences->Java->Installed JREs
When I
Simplest solution in Springboot
I'll give you the most simpler one if you use Springboot:
1.8
Then, right click on your Eclipse project: Maven > Update project > Update project configuration from pom.xml
That should do.