inflearn logo
講義

講義

知識共有

isdnhkさんの投稿

isdnhk isdnhk

@isdnhk2395

レビュー投稿数
1
平均評価
5.0

投稿 1

Q&A

주의! WebSecurityConfigurerAdapter deprecated

@Configuration @EnableWebSecurity //스프링 시큐리티 필터가 스프링 필터체인에 등록된다. public class SecurityConfig{ @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.csrf(CsrfConfigurer::disable); http.authorizeHttpRequests(authorize -> authorize .requestMatchers("/user/**").authenticated() .requestMatchers("/manager/**").hasAnyRole("ADMIN", "MANAGER") .requestMatchers("/admin/**").hasAnyRole("ADMIN") .anyRequest().permitAll() ); return http.build(); } } security 6.1입니다

いいね数
15
コメント数
8
閲覧数
4604