You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7614,23 +7614,20 @@ In order to avoid mixing different versions of Kotlin dependencies on the classp
7614
7614
With Maven, the Kotlin version can be customized via the `kotlin.version` property and plugin management is provided for `kotlin-maven-plugin`.
7615
7615
With Gradle, the Spring Boot plugin automatically aligns the `kotlin.version` with the version of the Kotlin plugin.
7616
7616
7617
-
Spring Boot also manages the version of Coroutines dependencies by importing Kotlin
7618
-
Coroutines BOM, which can be customized via the `kotlin-coroutines.version` property.
7617
+
Spring Boot also manages the version of Coroutines dependencies by importing the Kotlin Coroutines BOM.
7618
+
The version can be customized via the `kotlin-coroutines.version` property.
7619
7619
7620
-
TIP: `org.jetbrains.kotlinx:kotlinx-coroutines-reactor` dependency is provided by default
7621
-
if one bootstraps a Kotlin project with at least one Reactive dependency on https://start.spring.io/#!language=kotlin[start.spring.io].
7620
+
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].
7622
7621
7623
7622
7624
7623
[[boot-features-kotlin-configuration-properties]]
7625
7624
=== `@ConfigurationProperties`
7626
-
`@ConfigurationProperties` when used in combination with `@ConstructorBinding` (see the
7627
-
<<boot-features-external-config-constructor-binding,dedicated documentation>> for more details)
7628
-
supports classes with immutable `val` properties as shown in the following example:
7625
+
`@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:
7629
7626
7630
7627
[source,kotlin,indent=0]
7631
7628
----
7632
-
@ConfigurationProperties("example.kotlin")
7633
7629
@ConstructorBinding
7630
+
@ConfigurationProperties("example.kotlin")
7634
7631
data class KotlinExampleProperties(
7635
7632
val name: String,
7636
7633
val description: String,
@@ -7650,8 +7647,7 @@ Note that some features (such as detecting the default value or deprecated items
7650
7647
7651
7648
[[boot-features-kotlin-testing]]
7652
7649
=== Testing
7653
-
While it is possible to use JUnit 4 to test Kotlin code, JUnit 5 now provided by default
7654
-
with Spring Boot is recommended.
7650
+
While it is possible to use JUnit 4 to test Kotlin code, JUnit 5 is provided by default and is recommended.
7655
7651
JUnit 5 enables a test class to be instantiated once and reused for all of the class's tests.
7656
7652
This makes it possible to use `@BeforeClass` and `@AfterClass` annotations on non-static methods, which is a good fit for Kotlin.
0 commit comments