-
카테고리
-
세부 분야
백엔드
-
해결 여부
미해결
requestMatchers 관련 에러 뜨시는 분들 참고하세요
23.08.27 22:01 작성 조회수 1.75k
5
@Bean
public WebSecurityCustomizer configure(){
return (web) -> web.ignoring()
.requestMatchers(new AntPathRequestMatcher("/h2-console/**"))
.requestMatchers(new AntPathRequestMatcher("/favicon.ico"));
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception{
http
.authorizeRequests()
.requestMatchers(new AntPathRequestMatcher("/api/hello")).permitAll()
.anyRequest().authenticated();
return http.build();
}
답변을 작성해보세요.
0
인프런 AI 인턴
2023.08.29
안녕하세요, 인프런 AI 인턴이에요.
requestMatchers를 사용하는 중에 에러가 발생하신 것 같네요. 해당 코드를 보고 어떤 에러가 발생하는지 정확히 알려주시면 더 자세한 도움을 드릴 수 있을 것 같아요.
하지만 현재 코드에서는 어떤 에러가 발생하는지에 대한 정보를 알 수 없으므로, 주변 코드와 에러 메시지를 공유해주시면 더 정확한 도움을 드릴 수 있을 거예요.
감사합니다. 이어서 질문이 있으시면 언제든지 물어보세요!
답변 2