From 83ba7e69ecc16ec6f78c1f8ba693dc2acb1e4627 Mon Sep 17 00:00:00 2001 From: Andreas Kruck Date: Sat, 21 Dec 2024 02:30:25 +0100 Subject: [PATCH 1/2] Fix minor typo in reference documentation for Kotlin annotations Closes gh-34134 --- .../modules/ROOT/pages/languages/kotlin/annotations.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc b/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc index 813d2c106b3..41cc96ed929 100644 --- a/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc +++ b/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc @@ -14,7 +14,7 @@ For example, `@Autowired lateinit var thing: Thing` implies that a bean of type `Thing` must be registered in the application context, while `@Autowired lateinit var thing: Thing?` does not raise an error if such a bean does not exist. -Following the same principle, `@Bean fun play(toy: Toy, car: Car?) = Baz(toy, Car)` implies +Following the same principle, `@Bean fun play(toy: Toy, car: Car?) = Baz(toy, car)` implies that a bean of type `Toy` must be registered in the application context, while a bean of type `Car` may or may not exist. The same behavior applies to autowired constructor parameters. From 724700d708189d2f3243cc95c0b2bd625b404ea4 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Sat, 21 Dec 2024 15:31:01 +0100 Subject: [PATCH 2/2] Polishing --- .../modules/ROOT/pages/languages/kotlin/annotations.adoc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc b/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc index 41cc96ed929..1725a5dc98f 100644 --- a/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc +++ b/framework-docs/modules/ROOT/pages/languages/kotlin/annotations.adoc @@ -19,11 +19,8 @@ that a bean of type `Toy` must be registered in the application context, while a type `Car` may or may not exist. The same behavior applies to autowired constructor parameters. NOTE: If you use bean validation on classes with properties or a primary constructor -parameters, you may need to use +with parameters, you may need to use {kotlin-docs}/annotations.html#annotation-use-site-targets[annotation use-site targets], such as `@field:NotNull` or `@get:Size(min=5, max=15)`, as described in {stackoverflow-site}/a/35853200/1092077[this Stack Overflow response]. - - -