본문 바로가기
오류노트

스프링부트 : Could not autowire authentication manager 에러

by 어컴띵 2021. 3. 13.

참조 : stackoverflow.com/questions/49348551/could-not-autowire-authentication-manager-in-spring-boot-2-0-0/50163092

 

Could not autowire authentication manager in Spring Boot 2.0.0

So I've been trying to implement oAuth2 in a simple Spring MVC app. In the guide I was following, in their AuthorizationServerConfigurerAdapter they @Autowired an AuthenticationManager. They used ...

stackoverflow.com

WebSecurityConfigAdapter를 상속받아 정의한 클래스 안에 다음 메소드를 정의해야 한다.

@Bean
@Override
public AuthenticationManager authenticationManager() throws Exception{
	return super.authenticationManagerBean();
}