Clarify Package Import

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.
This commit is contained in:
madorb 2024-04-26 09:56:59 -05:00 committed by Marcus Hert Da Coregio
parent b3c7f3ff19
commit 1ae99be1cf
2 changed files with 2 additions and 2 deletions

View File

@ -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 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.

View File

@ -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):