Latest in branch 5.0
5.0.20
Released 09 Dec 2020
(5 years ago)
SoftwareSpring Framework
Version5.0
Supported
Java versions
Java 8+
Initial release5.0.0
28 Sep 2017
(8 years ago)
Latest release5.0.20
09 Dec 2020
(5 years ago)
End of
OSS support
Dec 2020
(Ended 5 years ago)
End of
enterprise support
Unavailable
Source codehttps://github.com/spring-projects/spring-framework/tree/v5.0.20.RELEASE
Documentationhttps://docs.spring.io/spring-framework/docs/5.0.20.RELEASE/spring-framework-reference/
Spring Framework 5.0 ReleasesView full list

What Is New in Spring Framework 5.0

Spring Framework 5.0 is a major release focused on modern Java development. It establishes a new baseline, cutting away legacy code and embracing the latest runtime and programming paradigms.

Category Key Changes
New Baseline Java 8+ and Java EE 7+ baseline; support for JDK 9 runtime; removal of deprecated packages and APIs.
Reactive Stack Introduction of Spring WebFlux, a reactive web framework built on Reactor 3.1, supporting Reactive Streams across the stack.
Language Support First-class Kotlin support, including functional bean registration and null-safety via extension functions.
Testing Full integration with JUnit 5 Jupiter, parallel test execution in the Spring TestContext Framework.
Core Container Improved performance via selective use of JDK 8 features; programmatic bean registration with functional style.
Web Improvements Support for HTTP/2, Jackson 2.9, Protobuf 3.0, XMLBeans, and Tiles 3.0. Servlet 4.0 support for the PushBuilder.

How does Spring 5.0 change the Java baseline and runtime support?

Spring 5.0 requires Java 8 or later, making Java 8's lambdas and default methods a foundation for the framework's own code. This allows for internal cleanups and performance optimizations that weren't possible before.

It also provides out-of-the-box support for running on JDK 9, handling classpath visibility with the module system. The framework's own modules are aligned with the Java 9 module system, preparing for future modular deployments.

Removed Packages and Libraries

Several legacy packages were removed to reduce the footprint and maintenance burden. This includes Portlet support, Velocity, JasperReports, and several others. The mock.static and webmvc-config.xml namespaces are also gone.

What is Spring WebFlux and when should I use it?

Spring WebFlux is a new, fully non-blocking, reactive web framework built on Project Reactor. It's designed for high-concurrency, low-latency use cases where traditional thread-per-request models become a bottleneck.

You can use it with two programming models: annotated controllers (similar to Spring MVC) or functional routing and handling. It runs on Servlet 3.1+ containers, Netty, or Undertow. In practice, WebFlux shines for applications with many streaming or real-time connections, like chat or market data feeds.

Reactive Across the Stack

The reactive support isn't just for the web layer. New reactive clients like WebClient and reactive repositories for data stores like MongoDB and Cassandra extend the non-blocking paradigm end-to-end.

What does first-class Kotlin support mean for developers?

Spring 5.0 introduces dedicated extensions that make Kotlin development feel native. You can write concise, idiomatic Kotlin code when building Spring applications.

Key features include null-safe bean injection, functional bean registration with GenericApplicationContext, and Kotlin null-safety support throughout the framework API. This matters because it reduces boilerplate and leverages Kotlin's strengths for more robust application code.

val context = GenericApplicationContext {
    registerBean<MyBean>()
    registerBean { MyOtherBean(ref<MyBean>()) }
}

How is testing improved in Spring Framework 5.0?

The biggest testing advancement is full integration with JUnit 5 Jupiter. This brings powerful new features like nested tests, dynamic tests, and improved extension points directly into Spring testing.

The Spring TestContext Framework now supports parallel test execution. This can significantly reduce the feedback loop for large test suites. You'll need to ensure your tests are properly isolated, but the performance gain is often worth the effort.

New Annotations and Utilities

New annotations like @DisplayName and @EnabledIf provide better control over test execution and reporting. The SpringExtension bridges Spring's testing support with the JUnit 5 programming model.

What core container and performance enhancements were made?

The core IoC container saw refinements for programmatic configuration and startup performance. The functional bean registration API allows for a more declarative style of wiring outside of annotation scanning.

Performance improvements come from reduced reflection overhead, optimized cache usage, and more efficient algorithm choices internally. For most applications, this means faster startup and slightly lower memory consumption, which is critical in microservices and serverless environments.

Selected JDK 8 Usage

The framework now uses Java 8 features like default methods in its own interfaces, reducing the need for adapter classes. This internal cleanup makes the codebase more maintainable and can have positive ripple effects on performance.

FAQ

Is Spring MVC deprecated now that WebFlux exists?
No, Spring MVC remains fully supported and is the recommended choice for most applications. WebFlux is an alternative for specific reactive use cases. Both can coexist in the same application.

Do I have to use Kotlin or Java 8 to upgrade to Spring 5.0?
You must use Java 8 or higher, but you can continue writing Java 8 code without using lambdas. Kotlin is optional but supported if you choose to adopt it.

What happened to the Portlet support?
The Portlet API support (spring-webmvc-portlet) was removed in Spring 5.0 due to its declining usage and maintenance cost. Applications using Portlets need to stay on Spring Framework 4.3.x or migrate to alternative UI architectures.

Can I use JUnit 4 tests with Spring 5.0?
Yes, JUnit 4 is still supported via the vintage engine. However, you are encouraged to migrate to JUnit 5 Jupiter for new tests to access the latest features.

Does Spring 5.0 support HTTP/2 with Servlet containers?
Yes, Spring 5.0 supports HTTP/2 for Servlet 4.0 compatible containers (like Tomcat 9). It also provides support via the PushBuilder interface for server push, a key feature of HTTP/2.

Releases In Branch 5.0

VersionRelease date
5.0.2009 Dec 2020
(5 years ago)
5.0.1915 Sep 2020
(5 years ago)
5.0.1821 Jul 2020
(5 years ago)
5.0.1728 Apr 2020
(6 years ago)
5.0.1614 Jan 2020
(6 years ago)
5.0.1502 Aug 2019
(6 years ago)
5.0.1409 May 2019
(7 years ago)
5.0.1331 Mar 2019
(7 years ago)
5.0.1209 Jan 2019
(7 years ago)
5.0.1127 Nov 2018
(7 years ago)
5.0.1015 Oct 2018
(7 years ago)
5.0.907 Sep 2018
(7 years ago)
5.0.826 Jul 2018
(7 years ago)
5.0.712 Jun 2018
(8 years ago)
5.0.608 May 2018
(8 years ago)
5.0.503 Apr 2018
(8 years ago)
5.0.419 Feb 2018
(8 years ago)
5.0.323 Jan 2018
(8 years ago)
5.0.227 Nov 2017
(8 years ago)
5.0.124 Oct 2017
(8 years ago)
5.0.028 Sep 2017
(8 years ago)
5.0.0.RC411 Sep 2017
(8 years ago)
5.0.0.RC324 Jul 2017
(8 years ago)
5.0.0.RC214 Jun 2017
(8 years ago)
5.0.0.RC108 May 2017
(9 years ago)
5.0.0.M523 Feb 2017
(9 years ago)
5.0.0.M430 Dec 2016
(9 years ago)
5.0.0.M308 Nov 2016
(9 years ago)
5.0.0.M221 Sep 2016
(9 years ago)
5.0.0.M128 Jul 2016
(9 years ago)