에러 전문

🤔원인

Spring Security 6.x 버전에서 RequestMatcher 설정 중 anyRequest() 다음에 requestMatchers가 있어, 에러가 발생

.authorizeHttpRequests(authorize -> authorize
        .requestMatchers(AUTH_WHITELIST).permitAll()
        .anyRequest().authenticated()
        .requestMatchers(CorsUtils::isPreFlightRequest).permitAll()
)

✅해결 방법

https://developyoun.github.io/spring/Can't-configure-mvcMatchers-after-anyRequest-이슈-처리/