回答編集履歴

1

.permitAll()忘れを修正

2022/09/13 09:29

投稿

IT001
IT001

スコア618

test CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  // これは、以下と同等になります
8
8
  .authorizeHttpRequests(authz -> authz
9
- .antMatchers("/h2-console/**")
9
+ .antMatchers("/h2-console/**").permitAll()
10
10
  ```
11
11
  ぱっと見で、分かりづらい部分なので
12
12
  h2-consoleのような特殊なURLは、antMatchersで書いた方が楽かもしれません(通常のURLは、mvcMatchersの方が良いです)