There is no PasswordEncoder mapped for the id null 에러
기존에 SpringSecurity 4 버전으로 개발을 하여 이전에는 문제가 없었지만,
SpringBoot 1.5.19 => SpringBoot2.1.4 버전으로 업그레이드 하면서
SpringSecurity 5 으로 변경되어 에러가 발생하였다.
기존에 동일한 패스워드 값을 사용해야한다면 아래과 같은 빈을 추가해준다.
- SpringSecurity 5 이전 버전에서 사용하던 NoOpPasswordEncoder 를 빈으로 등록
- Deprecated 되어 있기 때문에 권장하지는 않는다고 한다.
@Bean
public PasswordEncoder noOpPasswordEncoder() {
return NoOpPasswordEncoder.getInstance();
}
'개발경험 및 메모 > Spring & Java' 카테고리의 다른 글
Spring Content log남기기 (0) | 2020.10.08 |
---|---|
Springboot 1.5.19 -> 2.1.4 업데이트 마이그레이션 (0) | 2020.09.18 |
Springboot2 session 설정 (0) | 2020.08.24 |
SpringBoot2 JSP 실시간 적용방법 (0) | 2020.08.24 |
resolved [org.springframework.http.converter.httpmessagenotwritableexception: no converter found for return value of type (0) | 2020.08.20 |
최근댓글