Null-Safe applications with Spring Boot 4
Spring Boot 4 and the Spring portfolio now provide null-safe APIs using JSpecify annotations to help prevent NullPointerExceptions. The Spring team has annotated most major projects including Spring Framework 7, Spring Data 4, and Spring Security 7 with explicit nullability information. Developers can leverage this through IDE support (IntelliJ IDEA 2025.3+) for warnings, or use build-time checkers like NullAway for stricter enforcement. Kotlin 2 automatically translates these annotations to native Kotlin nullability. This allows teams to choose their level of null-safety adoption, from simple IDE warnings to fully null-safe applications, without breaking existing APIs.