fix
This commit is contained in:
parent
86b3b06e5f
commit
674df29a94
|
@ -14,8 +14,6 @@ public class MemberService {
|
|||
|
||||
@Autowired
|
||||
private MemberDAO memberDAO;
|
||||
@Autowired
|
||||
private BCryptPasswordEncoder passwordEncoder;
|
||||
|
||||
public Member signin(Member member) throws Exception {
|
||||
Member m = this.memberDAO.findByEmail(member);
|
||||
|
@ -28,7 +26,8 @@ public class MemberService {
|
|||
throw new Exception("Email Auth Confirm Check");
|
||||
}
|
||||
|
||||
Boolean match = this.passwordEncoder.matches(member.getPw(), m.getPw());
|
||||
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
|
||||
Boolean match = passwordEncoder.matches(member.getPw(), m.getPw());
|
||||
if(!match) return null;
|
||||
|
||||
return m;
|
||||
|
@ -36,7 +35,8 @@ public class MemberService {
|
|||
|
||||
public Member signup(Member member) {
|
||||
|
||||
member.setPw(this.passwordEncoder.encode(member.getPw()));
|
||||
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
|
||||
member.setPw(passwordEncoder.encode(member.getPw()));
|
||||
return this.memberDAO.save(member);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user