'formLogin()' is deprecated since version 6.1 and marked for removal

young·2024년 3월 27일
0

Spring Security

목록 보기
4/7
@Bean
    public SecurityFilterChain filterChain(HttpSecurity http)throws Exception{
        return http.
                authorizeRequests()
                .requestMatchers("/login","/signup","/user").permitAll()
                .anyRequest().authenticated()
                .and()
                .formLogin((formLogin) ->
                        formLogin
                                .loginPage("/login")
                                .defaultSuccessUrl("/articles")
                )
                .logout((logoutConfig) ->
                        logoutConfig
                                .logoutSuccessUrl("/login")
                                .invalidateHttpSession(true))
                .csrf((csrfConfig) ->
                        csrfConfig.disable()
                )
                .build();
    }

https://velog.io/@woosim34/Spring-Security-6.1.0%EC%97%90%EC%84%9C-is-deprecated-and-marked-for-removal-%EC%98%A4%EB%A5%98

profile
ฅʕ•̫͡•ʔฅ

0개의 댓글