Spring Boot 4.0 and 3.5: What’s new in the ecosystem

Spring Boot 4.0 and 3.5: What’s new in the ecosystem
It’s an exciting time for Java developers. As of early 2026, the Spring ecosystem has undergone a massive shift with the official release of Spring Boot 4.0 and the final feature-rich minor version of the 3.x line, Spring Boot 3.5.

It’s an exciting time for Java developers. As of early 2026, the Spring ecosystem has undergone a massive shift with the official release of Spring Boot 4.0 and the final feature-rich minor version of the 3.x line, Spring Boot 3.5.

Whether you’re looking to squeeze more performance out of your microservices or simplify your cloud-native deployments, these updates bring some of the most requested features in years. Here is a breakdown of what's new.


1. Spring Boot 4.0: the next generation

Released in late 2025, Spring Boot 4.0 marks the beginning of a new era. It isn't just a version bump; it's a modernization of the entire foundation.

The new baseline: Kotlin 2.2 and Java 21+

Spring Boot 4.0 has officially moved its baseline. While Spring Boot 3 required Java 17, version 4.0 strongly leans into Java 21 LTS features like Virtual Threads and Scoped Values. Even more significantly, Kotlin 2.2 is now the official baseline for Kotlin developers, providing native support for JSpecify null-safety annotations.

Leaner and safer with JSpecify

NullPointerExceptions are the bane of every Java developer's existence. Spring Boot 4.0 adopts JSpecify as its standard null-safety library.

  • Better Tooling: IntelliJ IDEA and the Kotlin compiler now provide deeper analysis of Java code annotated with JSpecify.
  • Cleaner APIs: The framework itself is now heavily annotated, making your code safer "out of the box."

2. Advanced performance: CDS and Startup Optimizations

Building on the work started in 3.3, Spring Boot 3.5 and 4.0 have perfected Class Data Sharing (CDS) support.

By using CDS, the JVM can pre-process class metadata and store it in an archive file. This results in:

  • Up to 40% faster startup times.
  • Reduced memory footprint (RSS) in containerized environments. Spring Boot now includes a dedicated "training run" mode to generate these archives automatically during your CI/CD build.

3. Structured logging as a First-Class Citizen

Gone are the days of manual Logback configuration for ELK or Splunk. Spring Boot 3.4 and 3.5 introduced built-in support for structured logging. You can now enable JSON logging with a single property:

Properties

logging.structured.format.console=ecs
# Options include ecs (Elastic), gelf (Graylog), or logstash

This feature also supports customizing stack traces to prevent "log bloat" by limiting the depth or formatting of error outputs in your JSON logs.


4. Developer experience: service connections and testing

Testing complex infrastructures like Kafka, Cassandra, or Redis has never been easier thanks to the expansion of @ServiceConnection.

  • SSL for Service Connections: You can now configure SSL/TLS for your Testcontainers and Docker Compose services using labels and annotations.
  • MockMvcTester: A new AssertJ-based alternative to the traditional MockMvc. It provides a more fluent and readable API for testing your web layer.

5. Better observability with OTLP

Spring Boot continues to be a leader in observability. The latest versions provide:

  • gRPC Transport for OTLP: You can now send OpenTelemetry spans and logs over gRPC instead of just HTTP.
  • Application grouping: Use spring.application.group to tag all telemetry from a specific business unit or microservice cluster, making it easier to filter data in tools like Prometheus or Jaeger.

Summary of Key Changes

FeatureVersion IntroducedImpact
Kotlin 2.2 Baseline4.0Modern language features and better null safety.
Structured Logging3.4 / 3.5Simplified integration with log aggregators.
Virtual Threads (Default)4.0Massive scalability for I/O bound tasks.
SSL for Testcontainers3.5Production-like security in local development.
@Fallback Beans3.4Easier management of multiple beans of the same type.

Next Steps

If you are still on Spring Boot 2.x, the gap is widening—now is the time to plan your migration to the 3.x line as a stepping stone to 4.0. If you're already on 3.x, upgrading to 3.5 is a low-risk way to get many of these features today.