This commit is contained in:
insanity 2017-06-28 16:11:21 +09:00
parent 86b3b06e5f
commit 674df29a94

View File

@ -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);
}