Spring 3.2.x with Java 8

There is a best effort support of JDK8 in the 3.2.x line, as of 3.2.9+.

See SPR-11656 for initial support in 3.2.9 and SPR-11979 for bytecode support improvements in 3.2.10. Please note the support limitations explained in the comments.

For comprehensive support of JDK8, please upgrade to Spring 4.x - there's a dedicated wiki page explaining the upgrade path, and the Spring team made great efforts to make that upgrade experience really easy.


Versions of the Spring Framework that are older than 4.0M1 do not work with classes that are compiled for Java 8.

Spring tries to Proxy these classes by reading class files, which won't work if they're "too new". If your @Service classes are compiled with Java 8 as the target, Spring will fail to load the classes on startup.

This means that you will have to upgrade to Spring 4.x.x, if you want to target Java 8 (and use lambdas, default implementations and so on).

I encountered this problem myself a few months ago with a project that uses Spring 3.x.x.


As per my observations, you can actually use spring 3 with code compiled in Java 8, as long as you do not use new java8 syntax in there (like lambdas) in the paths scanned.

So, you can use new APIs (streams ...), but not new syntax (lambdas...).

When I tried, I ended up with startup errors like org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class