Skip to content

Commit 50da5b6

Browse files
beckermarcmarcusdacoregio
authored andcommitted
Fix securityMatchers code sample
Closes gh-12296
1 parent 08afa17 commit 50da5b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ import static org.springframework.security.web.util.matcher.AntPathRequestMatche
409409
@Bean
410410
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
411411
http
412-
.securityMatcher(antMatcher("/api/**"), antMatcher("/app/**"))
412+
.securityMatchers((matchers) -> matchers
413+
.requestMatchers(antMatcher("/api/**"), antMatcher("/app/**"))
414+
)
413415
.authorizeHttpRequests((authz) -> authz
414416
.requestMatchers(antMatcher("/api/admin/**")).hasRole("ADMIN")
415417
.anyRequest().authenticated()

0 commit comments

Comments
 (0)