inflearn logo
Course

Course

Instructor

junseong Kim's Posts

junseong Kim junseong Kim

@gomshiki

Reviews Written
3
Average Rating
4.7

Posts 2

Q&A

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(); } }

Likes
0
Comments
3
Viewcount
1301