Polish "Update Kotlin-related reference documentation"
See gh-18573
This commit is contained in:
parent
c6c9818285
commit
65818038fe
|
|
@ -7614,23 +7614,20 @@ In order to avoid mixing different versions of Kotlin dependencies on the classp
|
|||
With Maven, the Kotlin version can be customized via the `kotlin.version` property and plugin management is provided for `kotlin-maven-plugin`.
|
||||
With Gradle, the Spring Boot plugin automatically aligns the `kotlin.version` with the version of the Kotlin plugin.
|
||||
|
||||
Spring Boot also manages the version of Coroutines dependencies by importing Kotlin
|
||||
Coroutines BOM, which can be customized via the `kotlin-coroutines.version` property.
|
||||
Spring Boot also manages the version of Coroutines dependencies by importing the Kotlin Coroutines BOM.
|
||||
The version can be customized via the `kotlin-coroutines.version` property.
|
||||
|
||||
TIP: `org.jetbrains.kotlinx:kotlinx-coroutines-reactor` dependency is provided by default
|
||||
if one bootstraps a Kotlin project with at least one Reactive dependency on https://start.spring.io/#!language=kotlin[start.spring.io].
|
||||
TIP: `org.jetbrains.kotlinx:kotlinx-coroutines-reactor` dependency is provided by default if one bootstraps a Kotlin project with at least one reactive dependency on https://start.spring.io/#!language=kotlin[start.spring.io].
|
||||
|
||||
|
||||
[[boot-features-kotlin-configuration-properties]]
|
||||
=== `@ConfigurationProperties`
|
||||
`@ConfigurationProperties` when used in combination with `@ConstructorBinding` (see the
|
||||
<<boot-features-external-config-constructor-binding,dedicated documentation>> for more details)
|
||||
supports classes with immutable `val` properties as shown in the following example:
|
||||
`@ConfigurationProperties` when used in combination with <<boot-features-external-config-constructor-binding,`@ConstructorBinding`>> supports classes with immutable `val` properties as shown in the following example:
|
||||
|
||||
[source,kotlin,indent=0]
|
||||
----
|
||||
@ConfigurationProperties("example.kotlin")
|
||||
@ConstructorBinding
|
||||
@ConfigurationProperties("example.kotlin")
|
||||
data class KotlinExampleProperties(
|
||||
val name: String,
|
||||
val description: String,
|
||||
|
|
@ -7650,8 +7647,7 @@ Note that some features (such as detecting the default value or deprecated items
|
|||
|
||||
[[boot-features-kotlin-testing]]
|
||||
=== Testing
|
||||
While it is possible to use JUnit 4 to test Kotlin code, JUnit 5 now provided by default
|
||||
with Spring Boot is recommended.
|
||||
While it is possible to use JUnit 4 to test Kotlin code, JUnit 5 is provided by default and is recommended.
|
||||
JUnit 5 enables a test class to be instantiated once and reused for all of the class's tests.
|
||||
This makes it possible to use `@BeforeClass` and `@AfterClass` annotations on non-static methods, which is a good fit for Kotlin.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue