Repaso
Español

Spring Boot 3 requires which Java version at minimum, and what package rename happened?

Options

  1. Java 8 as the minimum; no package change at all
  2. Java 17; javax.* packages became jakarta.* (Correct option)
  3. Java 11 as the minimum; java.* became jdk.*
  4. Java 21 as the minimum; spring.* became boot.*

Answer

Java 17; javax.* packages became jakarta.*

Why

Spring Boot 3 (Spring Framework 6) requires Java 17 or newer.

It also moved from Java EE to Jakarta EE 9+, so imports changed from javax.persistence.*, javax.servlet.*, javax.validation.* to jakarta.persistence.*, jakarta.servlet.*, jakarta.validation.*.

If you migrate an old project (Boot 2.x), this rename is the most common breaking change.

Remember

Boot 3 = Java 17+ and jakarta.* imports.

Key terms

Practice this question in Repaso