diff --git a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java index 4a22f14..c89342b 100644 --- a/src/main/java/com/loafle/overflow/module/member/service/MemberService.java +++ b/src/main/java/com/loafle/overflow/module/member/service/MemberService.java @@ -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); }