From 270fb7e9254133a560921c616d0177e6e7f71476 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Fri, 18 Oct 2019 10:45:49 +0200 Subject: [PATCH] Use read-only instead of immutable for properties --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 13f385b..897636f 100644 --- a/README.adoc +++ b/README.adoc @@ -357,7 +357,7 @@ JUnit 5 now used by default in Spring Boot provides various features very handy For the sake of this example, let's create an integration test in order to demonstrate various features: - We use real sentences between backticks instead of camel-case to provide expressive test function names - - JUnit 5 allows to inject constructor and method parameters, which is a good fit with Kotlin immutable and non-nullable properties + - JUnit 5 allows to inject constructor and method parameters, which is a good fit with Kotlin read-only and non-nullable properties - This code leverages `getForObject` and `getForEntity` Kotlin extensions (you need to import them) `src/test/kotlin/com/example/blog/IntegrationTests.kt` @@ -883,7 +883,7 @@ NOTE: `$` needs to be escaped in strings as it is used for string interpolation. == Configuration properties In Kotlin, the recommended way to manage your application properties is to leverage `@ConfigurationProperties` with -`@ConstructorBinding` in order to be able to use immutable properties. +`@ConstructorBinding` in order to be able to use read-only properties. `src/main/kotlin/com/example/blog/BlogProperties.kt` [source,kotlin]