I have Spring/Java App that is compiled with Compiler compliance level 1.5.
I have a new Linux setup where I downloaded Apache Tomcat 8.0.8<
Even though this answer has been perfectly answered, in some cases it's not desired or possible to upgrade the Java version or the Spring version.
In our case, we have to use JDK 8 to be able to communicate with Sonar (from Jenkins) and we don't want to change the spring-version, because we don't have the test capacity to test this upgrade.
Our solution was to simply override the Java version while building, using
-Djava.version=1.6.45