I would like to come up with some empirical evidence for, or against, migrating spring boot 2.7.x to kotlin >= 1.7.x.
Looking at the spring boot documentation, kotlin version 1.6.21 is listed. However, in some of the spring examples listed, point to at least kotlin 1.7.X less than one month after release.
Gradle has a pretty good compatibility matrix for kotlin usage, of which doesn't even list the current version that comes standard on the spring Initializer start.spring.io
| Kotlin Version | Gradle min and max versions |
|---|---|
| 1.8.20 | 6.8.3 – 7.6.0 |
| 1.8.0 | 6.8.3 – 7.3.3 |
| 1.7.20 | 6.7.1 – 7.1.1 |
Spring Boot 2.7.x uses Kotlin 1.6.x because Kotlin 1.6 was the latest version that was available when Spring Boot 2.7 was released. It hasn't been upgraded to Kotlin 1.7 or 1.8 as the policy for managing dependencies prohibits doing so:
As noted in the comments, you can use Kotlin 1.3.x or later with Spring Boot 2.7.x. The Kotlin baseline was raised in Spring Boot 3.0 and it requires 1.7.x or later.