springboot 2.7

스프링

Spring Security 6v 이상, AuthenticatonManager 생성 방법

6v 아래로는 스프링 시큐리티 의존성 사용시 WebSecurityConfigurerAdapter의 authenticationManager()  AuthenticationConfiguration.getAuthenticationManager()등을  활용했는데  6v 이상 오면서 별도의 방법이 필요합니다. WebSecurityConfigurerAdapter 대신 SecurityFilterChain을 빈 등록해줘야하고, 해당 메소드의 파라미터인 HttpSecurity를 통해 설정에서 사용되는 공유객체를 가져와 설정할 수 있습니다. 동작 방식공유 객체 검색: http.getSharedObject(AuthenticationManagerBuilder.class)는 HttpSecurity 객체 내에 공유된 Authe..

비오베베
'springboot 2.7' 태그의 글 목록