AuthenticationManager @Bean

인철·2023년 10월 4일

AuthenticationManager @Bean 생성

@Bean
AuthenticationManager authenticationManager(AuthenticationConfiguration 
	Spring Security에서 인증(authentication)을 관리하고 처리하는 핵심 인터페이스 중 하나

authenticationConfiguration) throws Exception {
	AuthenticationManager를 생성하고 반환, AnthenticationConfiguration을 매개변수로 받는다

	return authenticationConfiguration.getAuthenticationManager();
    authenticationConfiguration객체의 getAtuthenticationManager()을 호출하여 실제
    AuthenticationManager인스터를 받는다
    
}
throws Exception : 예외가 발생할 수 있다는 것을 알려줌
profile
같은글이있어도양해부탁드려요(킁킁)

0개의 댓글