From 8c2e5dcb4a727cc58268489a05aac6633673f64e Mon Sep 17 00:00:00 2001 From: sdeleuze Date: Thu, 14 Dec 2017 14:22:29 +0100 Subject: [PATCH] Update Kotlin reference documentation This commit removes the mention that Spring Boot 2.0 includes Jackson Kotlin module since it is not the case as of M7, and add a note about using bean validation annotations with Kotlin. --- src/docs/asciidoc/languages/kotlin.adoc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/docs/asciidoc/languages/kotlin.adoc b/src/docs/asciidoc/languages/kotlin.adoc index 0f968189c4..bdc9450e86 100644 --- a/src/docs/asciidoc/languages/kotlin.adoc +++ b/src/docs/asciidoc/languages/kotlin.adoc @@ -137,11 +137,6 @@ for serializing / deserializing JSON data is automatically registered when found in the classpath and a warning message will be logged if Jackson and Kotlin are detected without the Jackson Kotlin module present. -[NOTE] -==== -As of Spring Boot 2.0, Jackson Kotlin module is automatically provided via the JSON starter. -==== - @@ -159,6 +154,15 @@ to determine if a bean is required or not. `@Autowired lateinit var foo: Foo` im of type `Foo` must be registered in the application context while `@Autowired lateinit var foo: Foo?` won’t raise an error if such bean does not exist. +[NOTE] +==== +If you are using bean validation on classes with +https://kotlinlang.org/docs/reference/classes.html#constructors[primary constructor properties], +make sure to use +https://kotlinlang.org/docs/reference/annotations.html#annotation-use-site-targets[annotation use-site targets] +as described in https://stackoverflow.com/a/35853200/1092077[this Stack Overflow response]. +==== +