소스 검색

Fix securityMatchers code sample

Closes gh-12296
Marc Becker 2 년 전
부모
커밋
50da5b6498
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      docs/modules/ROOT/pages/migration/servlet/config.adoc

+ 3 - 1
docs/modules/ROOT/pages/migration/servlet/config.adoc

@@ -409,7 +409,9 @@ import static org.springframework.security.web.util.matcher.AntPathRequestMatche
 @Bean
 public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
     http
-        .securityMatcher(antMatcher("/api/**"), antMatcher("/app/**"))
+        .securityMatchers((matchers) -> matchers
+            .requestMatchers(antMatcher("/api/**"), antMatcher("/app/**"))
+        )
         .authorizeHttpRequests((authz) -> authz
             .requestMatchers(antMatcher("/api/admin/**")).hasRole("ADMIN")
             .anyRequest().authenticated()