[Spring Boot] There is no PasswordEncoder mapped for the id "null"
Sever 2018. 5. 2. 19:28java.lang.IllegalArgumentException: There is no PasswordEncoder mapped for the id "null"
The general format for a password is:
{id}encodedPassword
Such that id
is an identifier used to look up which PasswordEncoder
should be used and encodedPassword
is the original encoded password for the selected PasswordEncoder
. The id
must be at the beginning of the password, start with {
and end with }
. If the id
cannot be found, the id
will be null. For example, the following might be a list of passwords encoded using different id
. All of the original passwords are "password".
저 아이디는 PasswordEncoder를 찾는 식별자입니다. 꼭 써야하고 encodePassword는 선택된 PasswordEncoder에 의해 인코드 된 비밀번호입니다.
저 id는 { 로 시작하고 }로 끝나며, 비밀번호의 가장 처음에 위치해야합니다. 만약 id를 발견할 수 없다면 id는 null이 될 것입니다.
다른 id를 이용하여 encode 된 비밀번호의 리스트를 밑에 예로 적어놨습니다. 모든 예의 원본 비밀번호는 password 입니다.
암호화 예가 있었는데 나는 필요없어서 안적었다. 필요한사람은 링크 참조
스프링 시큐리티 버전 5 이상부터는 password 앞에 식별자 정보를 넣어야 된다 아니면
There is no PasswordEncoder mapped for the id "null"
에러가 난다.
자신이 암호화를 사용하지 않는다면
<security:authentication-manager>
<security:authentication-provider>
<security:user-service>
<security:user name="user" password="{noop}password" authorities="ROLE_USER"/>
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
이런식으로 비밀번호 앞에 {noop}을 적어두면 에러는 사라질 것
이다.
'Sever' 카테고리의 다른 글
카페24 node.js + mysql (0) | 2019.01.10 |
---|---|
[Spring Boot] Security InMemory "PasswordEncoder Error" (0) | 2018.05.03 |
Tomcat에러 (0) | 2018.04.30 |
[Spring Boot] [http://java.sun.com/jsp/jstl/core] cannot be resolved (0) | 2018.04.30 |
[Spring Boot] org.apache.jasper.JasperException (0) | 2018.04.30 |