WebSecurityConfigurerAdapter μμνμ¬ κ΅¬ννλ λ°©μμ΄ λ μ΄μ κΆμ₯λμ§ μκ³ , SecurityFilterChainBean λ±λ‘ λ°©μμ΄ λμ
λ¨.
μ΄μ μ¬λ¬ μ€νλ§ μνλ¦¬ν° κ΄λ ¨ κ΅μ¬λ λΈλ‘κ·Έ λ¬Έμλ€μ 보면, WebSecurityConfigurerAdapter ν΄λμ€λ₯Ό μμνμ¬ κ΅¬ννλ ννμ μ½λλ€μ΄ μλ€. μ΄ λ°©μμ Spring Security 5.7.0-M2 λ²μ λΆν° μλ‘μ΄ λ°©μμΈSecurityFilterChainBean μ λ±λ‘νλ λ°©μμ΄ λμ
λλ©΄μ WebSecurityConfigurerAdapter μμνμ¬ κ΅¬ννλ λ°©μμ deprecated λμλ€.
WebSecurityConfigurerAdapter μμ ꡬν λ°©μ
@EnableWebSecurity // ν΄λΉ ν΄λμ€λ₯Ό μ€νλ§ μνλ¦¬ν° μ€μ λΉμΌλ‘ λ±λ‘
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
...
}
...
}
Java
볡μ¬
SecurityFilterChainBean λ±λ‘ λ°©μ
@Configuration
@EnableWebSecurity
public class SecurityConfig {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
...
}
...
}
Java
볡μ¬