Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 8 with Spring 3.1

I have recently migrated one of my service using Spring 3.1 version from JDK 1.7 to JDK 8.

Are there any known issues with using JAVA 8 lambdas with Spring 3.1 version? My service uses spring heavily for all object autowiring as well as hibernate related annotations as well.

like image 855
Amit Avatar asked Jan 07 '23 13:01

Amit


1 Answers

Take a look at this blogpost:

Along with 4.0 M1, we’ve released Spring Framework 3.2.3, containing fixes for recently reported issues but also coming with OpenJDK 8 runtime support. Spring Framework 3.2.x will support deployment on JDK 8 runtimes for applications compiled against JDK 7 (with -target 1.7) or earlier. Note that it won’t support JDK 8’s bytecode format (-target 1.8, as needed for lambdas); please upgrade to Spring Framework 4.0 for that purpose.

So, Java 8 is supported as a runtime starting with Spring 3.2.x, but the code must be compiled against JDK 7. If you need/want to use Java 8 features, such as lambdas, etc. you will have to upgrade to Spring 4.

like image 111
Bohuslav Burghardt Avatar answered Jan 19 '23 15:01

Bohuslav Burghardt