์ฃผ์! 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์
๋๋ค