与 Java 11 兼容的最低 Spring 版本

Minimum Spring version compatible with Java 11

我需要尽快将应用程序升级到 Java 11,我想知道与 Java 11 兼容的最低 Spring 版本是什么。

我目前正在使用 Java 8 和 Spring 4.2.7。

来自他们的任务跟踪器 -- SPR-16391:Compatibility with JDK 11。 JDK 10、11 的兼容性计划与 5.1 GA 版本一起发布。

JDK 11 is currently scheduled for September 2018. Not expecting any major changes beyond JDK 10 from our perspective, we should be able to fully support it in the 5.1 line already.

Ideally our framework build would be able to run on JDK 8, 9, 10 as well as 11, even if our own test efforts will focus on JDK 8 and 11 (as the official long-term support branches) at that point.

虽然使用 spring framework 5.0,在模块路径上试验您自己的代码的选项仍然可行,provides out-of-the-box support for JDK 9 already

更新: Spring Framework 5.1 goes GA on 21st September, 2018

Spring 引导版本 2.1.0 has been released 具有完整的 Spring 5.1 和 Java 11 支持。

What’s new in 2.1

Third-party library upgrades.

We’ve upgraded to the latest stable releases of other third-party libraries wherever possible. Some notable dependency upgrades in this release include:

  • Hibernate 5.3
  • Micrometer 1.1
  • Spring Data Lovelace
  • Spring Framework 5.1
  • Tomcat 9
  • Undertow 2

JDK 版本范围

  • Spring 框架 5.3.x:JDK 8-19(预期)
  • Spring 框架 5.2.x: JDK 8-15
  • Spring 框架 5.1.x: JDK 8-12
  • Spring 框架 5.0.x: JDK 8-10
  • Spring 框架 4.3.x: JDK 6-8

更多信息请访问这里source