Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- grafana
- transit gateway
- Endpoints
- 비구조화 할당
- docker swarm
- cognito
- AWS
- Custom Resource
- docker
- On-Premise
- JavaScript
- vgw
- elasticsearch
- 구조분해 할당
- prometheus
- 단축 평가
- VPC
- Await
- rust
- 옵셔널 체이닝
- api gateway
- Site-to-Site VPN
- 러스트
- 온프레미스
- Kubernetes
- Proxy Resource
- Service
- 자바스크립트
- optional chaining
- null 병합 연산자
Archives
- Today
- Total
만자의 개발일지
[Spring Security] 'authenticationmanager must be specified' 에러 해결 방법 본문
Java/Spring Security
[Spring Security] 'authenticationmanager must be specified' 에러 해결 방법
박만자 2022. 2. 14. 13:12에러 발생 이유
UsernamePasswordAuthenticationFilter 클래스가 상속받고 있는 AbstractAuthenticationProcessingFilter 클래스에 AuthenticationManager객체를 할당하지 않아서 생긴 에러이다.


에러 해결 방법
UsernamePasswordAuthenticationFilter 클래스를 상속받는 Filter 클래스에 다음과 같은 코드를 추가해준다.
public class CustomAuthenticationFilter extends UsernamePasswordAuthenticationFilter {
public CustomAuthenticationFilter(AuthenticationManager authenticationManager) {
super.setAuthenticationManager(authenticationManager);
}
}
참고
Comments