Skip to content

Commit 88a8ef6

Browse files
committed
Add Details about @configuration
Closes gh-12486
1 parent 5e1db6a commit 88a8ef6

File tree

2 files changed

+104
-0
lines changed

2 files changed

+104
-0
lines changed

docs/modules/ROOT/pages/migration/reactive.adoc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,58 @@ http {
400400

401401
To opt-out of the 6.0 defaults and instead continue to pass `AuthenticationServiceException` on to ``ServerAuthenticationEntryPoint``s, you can follow the same steps as above, except set `rethrowAuthenticationServiceException` to false.
402402

403+
[[add-configuration-annotation]]
404+
== Add `@Configuration` annotation
405+
406+
In 6.0, `@Configuration` is removed from `@EnableWebFluxSecurity` and `@EnableReactiveMethodSecurity`.
407+
408+
To prepare for this, wherever you are using one of these annotations, you may need to add `@Configuration`.
409+
For example, `@EnableReactiveMethodSecurity` changes from:
410+
411+
====
412+
.Java
413+
[source,java,role="primary"]
414+
----
415+
@EnableReactiveMethodSecurity
416+
public class MyConfiguration {
417+
// ...
418+
}
419+
----
420+
421+
.Kotlin
422+
[source,java,role="primary"]
423+
----
424+
@EnableReactiveMethodSecurity
425+
open class MyConfiguration {
426+
// ...
427+
}
428+
----
429+
====
430+
431+
to:
432+
433+
====
434+
.Java
435+
[source,java,role="primary"]
436+
----
437+
@Configuration
438+
@EnableReactiveMethodSecurity
439+
public class MyConfiguration {
440+
// ...
441+
}
442+
----
443+
444+
.Kotlin
445+
[source,java,role="primary"]
446+
----
447+
@Configuration
448+
@EnableReactiveMethodSecurity
449+
open class MyConfiguration {
450+
// ...
451+
}
452+
----
453+
====
454+
403455
== Address OAuth2 Client Deprecations
404456

405457
=== `ServerOAuth2AuthorizedClientExchangeFilterFunction`

docs/modules/ROOT/pages/migration/servlet/config.adoc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,58 @@
22

33
The following steps relate to changes around how to configure `HttpSecurity`, `WebSecurity`, and `AuthenticationManager`.
44

5+
[[add-configuration-annotation]]
6+
== Add `@Configuration` annotation
7+
8+
In 6.0, `@Configuration` is removed from `@EnableWebSecurity`, `@EnableMethodSecurity`, `@EnableGlobalMethodSecurity`, and `@EnableGlobalAuthentication`.
9+
10+
To prepare for this, wherever you are using one of these annotations, you may need to add `@Configuration`.
11+
For example, `@EnableMethodSecurity` changes from:
12+
13+
====
14+
.Java
15+
[source,java,role="primary"]
16+
----
17+
@EnableMethodSecurity
18+
public class MyConfiguration {
19+
// ...
20+
}
21+
----
22+
23+
.Kotlin
24+
[source,java,role="primary"]
25+
----
26+
@EnableMethodSecurity
27+
open class MyConfiguration {
28+
// ...
29+
}
30+
----
31+
====
32+
33+
to:
34+
35+
====
36+
.Java
37+
[source,java,role="primary"]
38+
----
39+
@Configuration
40+
@EnableMethodSecurity
41+
public class MyConfiguration {
42+
// ...
43+
}
44+
----
45+
46+
.Kotlin
47+
[source,java,role="primary"]
48+
----
49+
@Configuration
50+
@EnableMethodSecurity
51+
open class MyConfiguration {
52+
// ...
53+
}
54+
----
55+
====
56+
557
[[use-new-requestmatchers]]
658
== Use the new `requestMatchers` methods
759

0 commit comments

Comments
 (0)