Java 8 Spring兼容性 [英] Java 8 Spring compatibility
问题描述
我目前正在将我的应用程序从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 onJDK 8
runtimes for applications compiled againstJDK 7
(with -target 1.7) or earlier. Note that it won’t supportJDK 8
’s bytecode format (-target 1.8, as needed for lambdas); please upgrade toSpring Framework 4.0
for that purpose.
关注这链接到源文章。
这篇关于Java 8 Spring兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!