Versioning

Spring Framework Versioning

The Spring Framework is the core framework for dependency injection, transaction management, and general application development.

  • Versioning Pattern: Major.Minor.Patch (e.g., 5.3.30)

  • Releases:

    • Major: Introduces breaking changes (e.g., Spring 5 → Spring 6)

    • Minor: New features and improvements (e.g., Spring 5.2 → Spring 5.3)

    • Patch: Bug fixes and security updates (e.g., Spring 5.3.30)

Spring Framework Latest Versions

Spring Version
Release Date
JDK Requirement
Key Changes

Spring 6.x (Latest)

Nov 2022

Java 17+

Jakarta EE 9+, AOT support

Spring 5.x

2017 - 2023

Java 8+

Functional programming support

Spring Boot Versioning

Spring Boot is built on top of Spring Framework and simplifies configuration.

  • Versioning Pattern: Uses Major.Minor.Patch (e.g., 3.1.2)

  • Spring Boot always aligns with a specific Spring Framework version.

  • Each Spring Boot version depends on a specific Spring Framework version.

Spring Boot and Spring Framework Compatibility

Spring Boot Version

Spring Framework Version

JDK Requirement

Spring Boot 3.x

Spring 6.x

Java 17+

Spring Boot 2.7.x

Spring 5.3.x

Java 8+

Spring Boot 2.6.x

Spring 5.3.x

Java 8+

How to Check the Spring & Spring Boot Versions?

1. Checking Spring Boot Version in pom.xml (Maven)

The Spring Boot version is specified in the parent section:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.1.2</version>  <!-- Spring Boot Version -->
</parent>

Since Spring Boot manages Spring Framework dependencies, this version determines which Spring Framework version is used.

2. Checking the Spring Framework Version

Method 1: Use mvn dependency:tree (Maven)

Run the following command in your project directory:

mvn dependency:tree | grep spring-core

This will output something like:

[INFO] org.springframework:spring-core:jar:6.0.11:compile

Here, Spring Framework version is 6.0.11.

Method 2: Check in dependencyManagement

If we're not using spring-boot-starter-parent, Spring Framework version may be declared manually:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>5.3.30</version>  <!-- Spring Framework Version -->
</dependency>

Method 3: Check at Runtime via Spring Boot Actuator

If we have Spring Boot Actuator enabled:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

Then visit below url.

http://localhost:8080/actuator/info

This will display Spring Boot and Spring Framework versions.

3. Checking in META-INF/MANIFEST.MF

If running a Spring Boot JAR, check:

unzip -p myapp.jar META-INF/MANIFEST.MF | grep Spring

or inside the JAR under:

BOOT-INF/lib/spring-core-*.jar

This file name contains the Spring Framework version.

Last updated

Was this helpful?