Java 8 Spring兼容性 [英] Java 8 Spring compatibility

查看:157
本文介绍了Java 8 Spring兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在将我的应用程序从Java 7迁移到Java 8,目前我正在运行Spring 3.1.6 jar。 这是否与Java 8兼容或者我需要升级Spring jar?

I am currently migrating my application from Java 7 to Java 8 and currently I am running the Spring 3.1.6 jar. Would this be compatible with Java 8 or I need to upgrade the Spring jar ?

我知道Spring 4x版本对Java有自然的支持8,但这是时间关键,我正在努力改变尽可能小的罐子。

I understand that the Spring 4x version has natural support for Java 8, but this is time critical and I am seeking to change as little jars as I can.

推荐答案

基本上 Spring 3.x 版本仅支持 Java-7 。如果要迁移到 Java-8 ,则应使用 Spring 4.x 版本。

Basically Spring 3.x versions supports up to Java-7 only. If you want to migrate to Java-8 you should use Spring 4.x version.


然而,一些春季发行说明说 Spring Framework 3.2.x
将支持部署在 JDK 8 上的应用程序,针对 JDK 7 (带-target 1.7)编译的
或早。请注意,它不会是
支持 JDK 8 的字节码格式(-target 1.8,lambdas需要);
请为此目的升级到 Spring Framework 4.0

However some spring release notes says that the 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.

关注链接到源文章。

这篇关于Java 8 Spring兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆