I found an issue when expecting the spring-boot-configuration-processor to apply when using Kotlin
When you create a project using start.spring.io and choose configuration processor you expect and classes annotated with @ConfigurationProperties to be included in docker image labels org.springframework.boot.spring-configuration-metadata.json and org.springframework.cloud.dataflow.spring-configuration-metadata.json
However with Kotlin classes this is not the case.
You need to add the Kapt plugin org.jetbrains.kotlin.kapt and a kapt configuration as follows:
configurations {
kapt {
extendsFrom annotationProcessor
}
}
Reproducer https://github.com/corneil/kapt-demo
Comment From: wilkinsona
Thanks, @corneil. This is covered in the reference documentation.
On the Initialzr side, https://github.com/spring-io/initializr/issues/438 is tracking setting things up automatically.
Comment From: corneil
@wilkinsona I would suggest adding a section about configurations.kapt.extendsFrom(annotationProcessor)
Comment From: wilkinsona
Rather than making a recommendation ourselves, we prefer to link to the Kotlin docs as the canonical source on the recommended way to set things up. To that end, the Boot docs that I linked to previously already contain a tip linking to https://kotlinlang.org/docs/kapt.html.