You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/migration-7/configuration.adoc
+57Lines changed: 57 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -123,3 +123,60 @@ In versions prior to 6.2, if you had a xref:servlet/configuration/java.adoc#jc-c
123
123
However, starting from version 6.2, this method is deprecated and will be removed in 7.0 because it will no longer be possible to chain configurations using `.and()` once `.and()` is removed (see https://github.com/spring-projects/spring-security/issues/13067).
124
124
Instead, it is recommended to use the new `.with(...)` method.
125
125
For more information about how to use `.with(...)` please refer to the xref:servlet/configuration/java.adoc#jc-custom-dsls[Custom DSLs section].
126
+
127
+
== Use `dispatcherTypeMatchers` instead of `shouldFilterAllDispatcherTypes`
128
+
129
+
If you are permitting the ERROR dispatch, you may be using `shouldFilterAllDispatcherTypes(false)` in the `auhorizeHttpRequests` DSL:
130
+
131
+
[tabs]
132
+
======
133
+
Java::
134
+
+
135
+
[source,java,role="primary"]
136
+
----
137
+
http
138
+
.authorizeHttpRequests((authorize) -> authorize
139
+
.shouldFilterAllDispatcherTypes(false)
140
+
// ...
141
+
)
142
+
----
143
+
144
+
Kotlin::
145
+
+
146
+
[source,kotlin,role="secondary"]
147
+
----
148
+
http {
149
+
authorizeHttpRequests {
150
+
shouldFilterAllDispatcherTypes = false
151
+
// ...
152
+
}
153
+
}
154
+
----
155
+
======
156
+
157
+
In preparation for 7, change this to use `dispatcherTypeMatchers`:
0 commit comments