Skip to content

Commit 8af3b5a

Browse files
grafjomarcusdacoregio
authored andcommitted
Fix documentation part of Multiple HttpSecurity Instances
`http.antMatcher()` is not longer available and was replaced with `http.securityMatcher()`, so use this in the Java Config Multiple HttpSecurity Instances example, too
1 parent fd25568 commit 8af3b5a

File tree

1 file changed

+2
-2
lines changed
  • docs/modules/ROOT/pages/servlet/configuration

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public class MultiHttpSecurityConfig {
209209
@Order(1) <2>
210210
public SecurityFilterChain apiFilterChain(HttpSecurity http) throws Exception {
211211
http
212-
.antMatcher("/api/**") <3>
212+
.securityMatcher("/api/**") <3>
213213
.authorizeHttpRequests(authorize -> authorize
214214
.anyRequest().hasRole("ADMIN")
215215
)
@@ -230,7 +230,7 @@ public class MultiHttpSecurityConfig {
230230
----
231231
<1> Configure Authentication as usual.
232232
<2> Create an instance of `SecurityFilterChain` that contains `@Order` to specify which `SecurityFilterChain` should be considered first.
233-
<3> The `http.antMatcher` states that this `HttpSecurity` is applicable only to URLs that start with `/api/`.
233+
<3> The `http.securityMatcher` states that this `HttpSecurity` is applicable only to URLs that start with `/api/`.
234234
<4> Create another instance of `SecurityFilterChain`.
235235
If the URL does not start with `/api/`, this configuration is used.
236236
This configuration is considered after `apiFilterChain`, since it has an `@Order` value after `1` (no `@Order` defaults to last).

0 commit comments

Comments
 (0)