Spring / Spring Boot 4 Basics Interview Questions
What is the Spring Boot 4 vs Spring Boot 3 comparison and what are the key takeaways?
Understanding the differences between Spring Boot 3 and Spring Boot 4 is the most common interview question for teams evaluating or migrating to Boot 4. Here is a structured comparison of every major dimension.
| Dimension | Spring Boot 3.x | Spring Boot 4.x |
|---|---|---|
| Release date | November 2022 (3.0), ongoing | November 20, 2025 (4.0) |
| Spring Framework | Spring Framework 6 | Spring Framework 7 |
| Jakarta EE | Jakarta EE 9 / 10 | Jakarta EE 11 (Servlet 6.1) |
| Minimum Java | Java 17 | Java 17 (same) |
| Best Java | Java 21 | Java 25 |
| Kotlin minimum | Kotlin 1.7+ | Kotlin 2.2 |
| Modularisation | Monolithic spring-boot-autoconfigure JAR | 70+ focused technology modules |
| API versioning | DIY (custom paths, filters, conditions) | Native: @GetMapping(version="2.0") |
| JSON library | Jackson 2 (com.fasterxml.jackson) | Jackson 3 (tools.jackson) |
| Null safety | spring.lang annotations | JSpecify portfolio-wide |
| Embedded servers | Tomcat 10, Jetty 11, Undertow 2 | Tomcat 11, Jetty 12.1 (Undertow REMOVED) |
| Retry/resilience | External spring-retry + @EnableRetry | Built-in @Retryable + @ConcurrencyLimit |
| HTTP clients | RestTemplate (legacy), WebClient | RestClient, HTTP Service Clients (@HttpExchange) |
| Test client | MockMvc or WebTestClient | RestTestClient (unified) |
| JUnit 4 | Supported via Vintage engine | REMOVED |
| Spring Security | Spring Security 6 | Spring Security 7 (MFA built-in) |
| Kafka | Spring Kafka 3.x | Spring Kafka 4.0 (Share Consumer) |
| GraalVM | native-image 23+ | native-image 25+ |
| Spring AI | Not included | Production-ready 1.x; heading to 2.x |
More Related questions...