The culprit is Lombok. The minimal Lombok version compatible with JDK 21 is 1.18.30
.
This implies that the minimal Spring Boot version is 3.1.4
, unless you want to meddle with the Spring Boot autoconfiguration and set the Lombok version in your project differently from the Spring Boot BOM defined in spring-boot-dependencies
.
See: https://github.com/projectlombok/lombok/issues/3393