Skip to content

Commit 5632469

Browse files
Merge branch '5.7.x' into 5.8.x
Closes gh-13101
2 parents f261242 + e61adcb commit 5632469

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/modules/ROOT/pages/reactive/configuration/webflux.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ public class HelloWebfluxSecurityConfig {
9494
.Kotlin
9595
[source,kotlin,role="secondary"]
9696
-----
97+
import org.springframework.security.config.web.server.invoke
98+
9799
@Configuration
98100
@EnableWebFluxSecurity
99101
class HelloWebfluxSecurityConfig {
@@ -122,6 +124,9 @@ class HelloWebfluxSecurityConfig {
122124
-----
123125
====
124126

127+
[NOTE]
128+
Make sure that you import the `invoke` function in your Kotlin class, sometimes the IDE will not auto-import it causing compilation issues.
129+
125130
This configuration explicitly sets up all the same things as our minimal configuration.
126131
From here you can easily make the changes to the defaults.
127132

@@ -176,6 +181,8 @@ static class MultiSecurityHttpConfig {
176181
.Kotlin
177182
[source,kotlin,role="secondary"]
178183
----
184+
import org.springframework.security.config.web.server.invoke
185+
179186
@Configuration
180187
@EnableWebFluxSecurity
181188
open class MultiSecurityHttpConfig {

docs/modules/ROOT/pages/servlet/configuration/kotlin.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ It is configured with the following default implementation:
1616

1717
[source,kotlin]
1818
----
19+
import org.springframework.security.config.annotation.web.invoke
20+
1921
@Bean
2022
open fun filterChain(http: HttpSecurity): SecurityFilterChain {
2123
http {
@@ -29,6 +31,9 @@ open fun filterChain(http: HttpSecurity): SecurityFilterChain {
2931
}
3032
----
3133

34+
[NOTE]
35+
Make sure that import the `invoke` function in your class, sometimes the IDE will not auto-import it causing compilation issues.
36+
3237
The default configuration above:
3338

3439
* Ensures that any request to our application requires the user to be authenticated
@@ -54,6 +59,8 @@ For example, the following is an example of having a different configuration for
5459

5560
[source,kotlin]
5661
----
62+
import org.springframework.security.config.annotation.web.invoke
63+
5764
@EnableWebSecurity
5865
class MultiHttpSecurityConfig {
5966
@Bean <1>

0 commit comments

Comments
 (0)