modify pw

This commit is contained in:
geek 2017-08-18 14:54:30 +09:00
parent 368e89df18
commit 1fbb4f8fcb

View File

@ -72,6 +72,14 @@ public class MemberService {
public Member modify(Member member) {
Member preMember = this.memberDAO.findByEmail(member.getEmail());
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
Boolean match = passwordEncoder.matches(member.getPw(), preMember.getPw());
if(!match) {
throw new SignInPwNotMatchException();
}
return this.memberDAO.save(member);
}