From c82ec7b1f50f94d7486e500835ad4abc1c4070d8 Mon Sep 17 00:00:00 2001 From: madorb <823868+madorb@users.noreply.github.com> Date: Fri, 26 Apr 2024 09:50:24 -0500 Subject: [PATCH] Provide more explict instructions regarding the necessary import to make the kotlin DSL work. For some reason it took me 10 minutes to figure this out based on the existing doc. --- docs/modules/ROOT/pages/reactive/configuration/webflux.adoc | 2 +- docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/modules/ROOT/pages/reactive/configuration/webflux.adoc b/docs/modules/ROOT/pages/reactive/configuration/webflux.adoc index 24e3456e434..8c28bb2ef6d 100644 --- a/docs/modules/ROOT/pages/reactive/configuration/webflux.adoc +++ b/docs/modules/ROOT/pages/reactive/configuration/webflux.adoc @@ -132,7 +132,7 @@ class HelloWebfluxSecurityConfig { ====== [NOTE] -Make sure that you import the `invoke` function in your Kotlin class, sometimes the IDE will not auto-import it causing compilation issues. +Make sure to import the `org.springframework.security.config.annotation.web.invoke` function in your Kotlin class to enable the Kotlin DSL in your class, as the IDE will not always auto-import the method, causing compilation issues. This configuration explicitly sets up all the same things as our minimal configuration. From here, you can more easily make changes to the defaults. diff --git a/docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc b/docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc index 8abfbbfbc48..8441d751e7b 100644 --- a/docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc +++ b/docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc @@ -36,7 +36,7 @@ open fun filterChain(http: HttpSecurity): SecurityFilterChain { ---- [NOTE] -Make sure to import the `invoke` function in your class, as the IDE will not always auto-import the method, causing compilation issues. +Make sure to import the `org.springframework.security.config.annotation.web.invoke` function to enable the Kotlin DSL in your class, as the IDE will not always auto-import the method, causing compilation issues. The default configuration (shown in the preceding listing):