New major version Spring Shell 4.0 marks milestone

The release utilizes the open-source project JSpecify for null safety and features a more modular architecture to simplify customization.

listen Print view
Meadow

(Image: LeManna / Shutterstock.com)

2 min. read
Contents

The Spring team has released the new major version Spring Shell 4.0.0. It is available on the central Maven repository Maven Central, is intended to represent a significant milestone for Spring Shell, and is compatible with the current Spring Framework and Spring Boot versions. Updates include changes to the architecture, null safety, and command creation.

Version 4.0 of Spring Shell is based on Spring Framework 7, which was released in November 2025. The open-source Java framework introduced a new concept for null safety: Just like the framework, Spring Shell now uses the open-source project JSpecify for null safety, which is intended to prevent errors caused by handling null pointers.

In addition, the new Spring Shell version brings a revised command model to simplify the creation and management of commands. A more modular architecture is intended to benefit custom adaptation and extension of the shell. The documentation and examples have also been updated to help users get started with Spring Shell.

A migration guide can be found in the project wiki here. It should be noted that before migrating to Spring Shell 4, applications should first be updated to the latest 3.4.x version.

Among the module changes is that the spring-shell-core module is no longer dependent on Spring Boot and JLine. The spring-shell-standard and spring-shell-standard-commands modules have been integrated into the spring-shell-core module.

APIs and annotations marked as deprecated in Spring Shell 3 have been removed, including legacy annotations such as ShellComponent and ShellMethod.

With Spring Shell, developers can create a Spring-based shell application. As the Spring team explains, such a command-line application can be helpful for interacting with a project's REST API or working with local data content. Further information – including example applications and tutorials – is available in the GitHub repository.

(mai)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.