We’re developing applications using kotlin and spr...
# announcements
j
We’re developing applications using kotlin and spring boot which runs in kubernetes. Are there any issues running kotlin in a java 11 docker image? For example
adoptopenjdk:11-jre-hotspot
? Are there any others more appropriate? And if a kotlin app is developed and run in java 11, are there any reasons for seting jvmTarget = 1.8 i gradle? When i generate a new kotlin java 11 project using spring boot initialiser it sets the
jvmTarget = "1.8"
even though i choose java 11 in the project creator.
c
We run Spring boot 2.2 full Kotlin 1.3.61 apps on JVM11 dockerized and deployed to Kubernetes in production since December 2019 and in staging since September 2019. So far there was not a single problem caused by the stack. You're probably safe. We set jvmTarget to
"11"
, but for now that's just for consistency, it doesn't do anything different from
"1.8"
. Older versions of Kotlin compiler did not support versions above
1.8
, so Spring is probably conservative, or just noone bother to update that part, as for not it doesn't matter. As for which jdk image to choose as the base - I'm not sure, depends on your use-case. For us it didn't matter much, so we went with the popular option on docker hub:
openjdk
, and with version:
11-slim
.
j
Thanks for the feedback, appreciate it! 👍
👌 1