inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

junseong Kim님의 게시글

junseong Kim junseong Kim

@gomshiki

수강평 작성수
3
평균평점
4.7

게시글 2

질문&답변

2:00 에서 저처럼 버전 안 맞춰서 해서 헤매는 분들 이걸로 해보세요.

terrinens 님 덕분에 해결했습니다. 감사합니다. 추가로 저는 spring 3.1.5 사용중인데 알려주신 코드대로 했을 때 requestMatchers()에서 Ant 패턴으로 작성하라는 컴파일 에러가 발생해서 아래와 같이 수정했습니다. @Configuration @EnableWebSecurity @EnableMethodSecurity public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { return httpSecurity .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests((registry) -> registry.requestMatchers(new AntPathRequestMatcher("/api/hello")).permitAll() .anyRequest().authenticated() ) .build(); } }

좋아요수
0
댓글수
3
조회수
1287